mirror of
https://https.git.savannah.gnu.org/git/patch.git
synced 2026-01-27 18:05:02 +00:00
Don't fail when removing nonexistent files in move_file
This commit is contained in:
parent
6d9e60f59a
commit
4e894668a7
@ -1,3 +1,8 @@
|
||||
2009-06-15 Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
* src/util.c (move_file): Don't fail when removing nonexistent
|
||||
files: this condition is already checked in maybe_reverse().
|
||||
|
||||
2009-06-05 Andreas Gruenbacher <agruen@suse.de>
|
||||
|
||||
* gl/lib/getopt_int.h, gl/lib/strndup.c, gl/m4/strndup.m4: Add
|
||||
|
||||
@ -328,7 +328,7 @@ move_file (char const *from, int volatile *from_needs_removal,
|
||||
{
|
||||
if (debug & 4)
|
||||
say ("Removing file %s\n", quotearg (to));
|
||||
if (unlink (to) != 0)
|
||||
if (unlink (to) != 0 && errno != ENOENT)
|
||||
pfatal ("Can't remove file %s", quotearg (to));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user