diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2009-06-15 23:31:47 +0200 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2009-06-15 23:31:47 +0200 |
commit | 4e894668a7b8917c4efbb88c6fbce157fc90d4aa (patch) | |
tree | f11cfd36a6d37c5f24494f23233cf3c84faee4df | |
parent | 6d9e60f59a055921a6fb161588fe204e2d359349 (diff) | |
download | patch-4e894668a7b8917c4efbb88c6fbce157fc90d4aa.tar.gz |
Don't fail when removing nonexistent files in move_file
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/util.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -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)); } } |