aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/exec-cmd.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/exec-cmd.c b/src/exec-cmd.c
index 90a666e..8936315 100644
--- a/src/exec-cmd.c
+++ b/src/exec-cmd.c
@@ -361,13 +361,9 @@ int cmd_remove(int argc, char *argv[])
print_error("Error: No such file exists\n");
return 1;
}
- if(result == F_ISDIR) {
- if(count_dir_entries(path) != 0) {
- print_error("Error: Directory not empty\n");
- return 1;
- }
- }
+ /* If path names a directory, remove() shall be equivalent
+ to rmdir(). */
result = remove(path);
if(result) {
print_error("Error: %s\n", strerror(errno));