Skip to content

Commit

Permalink
Clarify warning if server-state was modified
Browse files Browse the repository at this point in the history
  • Loading branch information
gperciva authored and cperciva committed Feb 8, 2025
1 parent 60ecee0 commit 7b1502a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tar/bsdtar.c
Original file line number Diff line number Diff line change
Expand Up @@ -1311,11 +1311,15 @@ main(int argc, char **argv)
#endif

if (bsdtar->return_value != 0) {
/* If we modified the storage, return 2 instead. */
if (bsdtar->storage_modified)
bsdtar->return_value = 2;
bsdtar_warnc(bsdtar, 0,
"Error exit delayed from previous errors.");
/* If we modified the storage, return 2 instead, and warn. */
if (bsdtar->storage_modified) {
bsdtar->return_value = 2;
bsdtar_warnc(bsdtar, 0,
"Data on server was modified, but it might not"
"be exactly what you requested");
}
}
return (bsdtar->return_value);
}
Expand Down

0 comments on commit 7b1502a

Please sign in to comment.