You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new option to rm (-d/--dir), which allows removal of
empty directories, while still safely disallowing removal
of non-empty ones.
This change improves compatibility with Mac OS X and BSD systems
which all have the -d flag.
* src/remove.c (rm_fts): allow removal of empty dir if the option is set
* src/remove.h (rm_options): new option - remove_empty_directories
* src/rm.c (long_opts, usage, main): usage && option parsing
* tests/Makefile.am: added new test cases (d-1, d-2)
* tests/rm/d-1: new test case - successfully delete empty dir
* tests/rm/d-2: new test case - refuse to delete nonempty dir
0 commit comments