about summary refs log tree commit diff
path: root/archive.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--archive.c12
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");