diff options
-rw-r--r-- | findutils/find.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/findutils/find.c b/findutils/find.c index f72cad7..bd7ccc3 100644 --- a/findutils/find.c +++ b/findutils/find.c @@ -768,7 +768,10 @@ ACTF(delete) { int rc; if (S_ISDIR(statbuf->st_mode)) { - rc = rmdir(fileName); + /* "find . -delete" skips rmdir(".") */ + rc = 0; + if (NOT_LONE_CHAR(fileName, '.')) + rc = rmdir(fileName); } else { rc = unlink(fileName); } |