From de5b055bbf6c77246826f1276c2a5b9c7264b2bf Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 9 Dec 2007 00:56:02 +0100 Subject: "rm" as root would fail to unlink a non-directory on OS X 10.4.x * src/remove.c (remove_entry) ["can unlink directories"]: Fix a mistakenly reversed condition. * NEWS: Mention this bug fix. Reported by Pieter Bowman. --- src/remove.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/remove.c b/src/remove.c index 11e2ccb0e..de8f5ffc9 100644 --- a/src/remove.c +++ b/src/remove.c @@ -1150,7 +1150,7 @@ remove_entry (int fd_cwd, Dirstack_state const *ds, char const *filename, dirent_type = DT_DIR; } - if (dirent_type == DT_DIR) + if (dirent_type != DT_DIR) { /* At this point, barring race conditions, FILENAME is known to be a non-directory, so it's ok to try to unlink it. */ -- cgit v1.2.3-54-g00ecf