Closed james-cook closed 2 years ago
-c is described in the help as "Clean up empty directories while deleting duplicates" - i.e., if all files in a dir are deleted because they are duplicates, also delete the now-empty dir.
To avoid counting dirs that were already empty as lint, run rmlint with something like -T "defaults -ed"
(default lint types minus empty dirs).
Ah, OK, makes sense. Thanks for the helpful information - I will close this issue now :)
rmlint version 2.10.1 compiled on raspberry pi last year.
When I run rmlint e.g.
rmlint -c sh:hardlink -S dma -s -1TB --xattr /srv/dev-disk-by-label-OMV2/shd2
It generates an rmlint.sh file with many handle_emptydir lines.
If I then run the script rmlint.sh without including the "-c" (clean up empty directories) option, the function handle_emptydirs is still called. This is perhaps in itself ok but this function does not check the "-c" (DO_DELETE_EMPTY_DIRS) flag:
In fact DO_DELETE_EMPTY_DIRS is only ever checked inside remove_cmd() and this function is never called (?)
Coming back to rmlint after some time, I am probably missing something simple.