Fix exit status with -f for nonexistent paths

Thanks Michael Forney <mforney@mforney.org> for reporting this!
This commit is contained in:
FRIGN 2015-03-01 23:48:50 +01:00
parent 80d89c400f
commit 48696d8c95

View File

@ -1,4 +1,5 @@
/* See LICENSE file for copyright and license details. */
#include <errno.h>
#include <stdio.h>
#include "../fs.h"
@ -16,6 +17,6 @@ rm(const char *path, int unused)
if (remove(path) < 0) {
if (!rm_fflag)
weprintf("remove %s:", path);
rm_status = 1;
rm_status = !(rm_fflag && errno == ENOENT);
}
}