sahib / rmlint

Extremely fast tool to remove duplicates and other lint from your filesystem
http://rmlint.rtfd.org
GNU General Public License v3.0
1.86k stars 128 forks source link

STAMPFILE for maintaining directory timestamps is not deleted when executing rmlint.sh using -n (dry run) #554

Open ahmgithubahm opened 2 years ago

ahmgithubahm commented 2 years ago

This feature was introduced under #366.

However, the STAMPFILE is not deleted when executing rmlint.sh using -n (dry run). Or rather, the STAMPFILE probably shouldn't be created at all when executing rmlint.sh using -n (dry run).

thanks!

ahmgithubahm commented 2 years ago

Hmm, actually I realised the STAMPFILE is not deleted even when not using dry run, when the handler is anything but 'remove', since the 'remove' handler is the only one that makes use of the STAMPFILE (and deletes it)!

cebtenzzre commented 2 years ago

STAMPFILE is only created if -k is passed, but I agree that it's confusing that -k has any effect in combination with -n, and that the file is never removed. Also, IMO, using $0 as a second stamp file is ugly and doesn't work if the script is read from a pipe, and both files should be on tmpfs like in https://github.com/Cebtenzzre/rmlint/commit/2d58ff28f14e2a905ecff7385d548fa5a0ed33e3. Maybe I'll put together a PR.