fix(shorten): exit 3 if removal would leave the file empty

This commit is contained in:
Laurent Gourvenec 2024-03-19 15:52:34 +01:00
parent 3cc9e61a62
commit c818b3c732
1 changed files with 2 additions and 2 deletions

View File

@ -114,8 +114,8 @@ int main(int argc, char **argv) {
// Beginning of file? // Beginning of file?
if (lseek(fd, 0, SEEK_CUR) == 0) { if (lseek(fd, 0, SEEK_CUR) == 0) {
printf("No change: file does not end with a newline\n"); printf("No change: requested removal would leave empty file\n");
return 1; return 3;
} }
} }