diff options
Diffstat (limited to 'libq')
-rw-r--r-- | libq/xmkdir.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/libq/xmkdir.c b/libq/xmkdir.c index ed30d6d3..aa93905b 100644 --- a/libq/xmkdir.c +++ b/libq/xmkdir.c @@ -89,18 +89,7 @@ rm_rf_at(int dfd, const char *path) static int rm_rf(const char *path) { - rm_rf_at(AT_FDCWD, path); - - if (rmdir(path) == 0) - return 0; - - /* if path is a symlink, unlink it */ - if (unlink(path) == 0) - return 0; - - /* XXX: we don't handle: - * trailing slashes: `rm -rf a/b/c/` -> need to change to a/b/c */ - return -1; + return rm_rf_at(AT_FDCWD, path); } static int |