diff options
author | June McEnroe <june@causal.agency> | 2021-06-11 12:27:59 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-06-11 12:27:59 -0400 |
commit | 2b4e22c3e4b28b08a0869b3a771ba54f0c615331 (patch) | |
tree | 87a451b0de0deb27a4e5837f200b8883bafe196a /archive.c | |
parent | Fix decoding adjacent encoded-words (diff) | |
download | bubger-2b4e22c3e4b28b08a0869b3a771ba54f0c615331.tar.gz bubger-2b4e22c3e4b28b08a0869b3a771ba54f0c615331.zip |
Remove -t truncate flag
It can't actually be used correctly: two updates in quick succession can truncate the output before it is read, causing files to be missed.
Diffstat (limited to '')
-rw-r--r-- | archive.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/archive.c b/archive.c index 3c5f12b..575bc56 100644 --- a/archive.c +++ b/archive.c @@ -82,7 +82,6 @@ static void createDirs(void) { int main(int argc, char *argv[]) { int exitStatus = 0; - bool truncate = false; const char *host = NULL; const char *port = "imaps"; @@ -96,7 +95,7 @@ int main(int argc, char *argv[]) { for ( int opt; - 0 < (opt = getopt(argc, argv, "A:C:H:S:T:a:h:im:p:qs:tu:vw:y:")); + 0 < (opt = getopt(argc, argv, "A:C:H:S:T:a:h:im:p:qs:u:vw:y:")); ) { switch (opt) { break; case 'A': concatIndexEntries = strtoul(optarg, NULL, 10); @@ -114,7 +113,6 @@ int main(int argc, char *argv[]) { break; case 'p': port = optarg; break; case 'q': quiet = true; exitStatus = EXIT_FAILURE; break; case 's': baseSubscribe = optarg; - break; case 't': truncate = true; break; case 'u': baseURL = optarg; break; case 'v': imapVerbose = true; break; case 'w': passPath = optarg; @@ -181,13 +179,7 @@ int main(int argc, char *argv[]) { for (; resp = respOk(imapResp(&imap)), resp.tag != login; respFree(resp)); respFree(resp); -examine: - if (truncate) { - int error = ftruncate(STDOUT_FILENO, 0); - if (error) warn("ftruncate"); - rewind(stdout); - } - +examine:; uint32_t uidNext = 0; uint32_t uidValidity = 0; enum Atom examine = atom("examine"); |