commit 5538d24c8b54ee4275d405c1fb1338556669fc9d
Author: Jim Meyering <meyering(a)redhat.com>
Date: Mon Jun 6 19:00:56 2011 +0200
suppress useless diagnostic about failed unlink
There were 20k of these in the log from running t/exercise.
* backend.c (fs_put_child): Don't complain about failed unlink
if it's due to ENOENT.
backend.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/backend.c b/backend.c
index cbb7960..251d730 100644
--- a/backend.c
+++ b/backend.c
@@ -1268,8 +1268,8 @@ fs_put_child (void * ctx)
error(0,0,_("path too long in %s"),__func__);
return NULL;
}
- if (unlink(fixed) < 0) {
- error(0,errno,_("unlink failed for %s (non-fatal)"),fixed);
+ if (unlink(fixed) < 0 && errno != ENOENT) {
+ error(0,errno,_("unlink failed for %s"),fixed);
}
fd = open(fixed,O_WRONLY|O_CREAT|O_EXCL,0666);
if (fd < 0) {
Show replies by date