]> granicus.if.org Git - neomutt/commitdiff
comp_mbox_close: swap if clauses
authorRichard Russon <rich@flatcap.org>
Fri, 15 Feb 2019 23:14:48 +0000 (23:14 +0000)
committerRichard Russon <rich@flatcap.org>
Sat, 16 Feb 2019 14:53:12 +0000 (14:53 +0000)
compress.c

index 13a3aa8224f7ddf292f204b9899a3154798a8579..e33fd56b61cb2140b0426d6d66ee3753561b71df 100644 (file)
@@ -708,19 +708,7 @@ static int comp_mbox_close(struct Mailbox *m)
   ops->mbox_close(m);
 
   /* sync has already been called, so we only need to delete some files */
-  if (!m->append)
-  {
-    /* If the file was removed, remove the compressed folder too */
-    if ((access(m->path, F_OK) != 0) && !SaveEmpty)
-    {
-      remove(m->realpath);
-    }
-    else
-    {
-      remove(m->path);
-    }
-  }
-  else
+  if (m->append)
   {
     const char *append = NULL;
     const char *msg = NULL;
@@ -748,6 +736,18 @@ static int comp_mbox_close(struct Mailbox *m)
 
     unlock_realpath(m);
   }
+  else
+  {
+    /* If the file was removed, remove the compressed folder too */
+    if ((access(m->path, F_OK) != 0) && !SaveEmpty)
+    {
+      remove(m->realpath);
+    }
+    else
+    {
+      remove(m->path);
+    }
+  }
 
   free_compress_info(m);