(quit): Don't call rename if both file and draftfile are the same.
Showing
1 changed file
with
2 additions
and
1 deletions
... | @@ -423,7 +423,8 @@ quit (struct mh_whatnow_env *wh, int argc, char **argv, int *status) | ... | @@ -423,7 +423,8 @@ 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 | rename (wh->file, wh->draftfile); | 426 | if (strcmp (wh->file, wh->draftfile)) |
427 | rename (wh->file, wh->draftfile); | ||
427 | } | 428 | } |
428 | } | 429 | } |
429 | 430 | ... | ... |
-
Please register or sign in to post a comment