Commit 8443e9ae 8443e9ae4f1099c4b0d49fb21fea5a1cb656290a by Sergey Poznyakoff

(quit): Don't call rename if both file and draftfile are the same.

1 parent 6457912a
...@@ -423,6 +423,7 @@ quit (struct mh_whatnow_env *wh, int argc, char **argv, int *status) ...@@ -423,6 +423,7 @@ quit (struct mh_whatnow_env *wh, int argc, char **argv, int *status)
423 else 423 else
424 { 424 {
425 printf (_("draft left on \"%s\".\n"), wh->draftfile); 425 printf (_("draft left on \"%s\".\n"), wh->draftfile);
426 if (strcmp (wh->file, wh->draftfile))
426 rename (wh->file, wh->draftfile); 427 rename (wh->file, wh->draftfile);
427 } 428 }
428 } 429 }
......