Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ahmgithubahm opened this issue Feb 8, 2022 · 2 comments · May be fixed by #556

Comments

@ahmgithubahm
Copy link

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
Copy link
Author

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
Copy link
Collaborator

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 cebtenzzre@2d58ff2. Maybe I'll put together a PR.

cebtenzzre added a commit to cebtenzzre/rmlint that referenced this issue Feb 9, 2022
- mktemp in /tmp
- don't assume $0 is a file
- remove stampfiles at exit
- don't create stampfiles if -n is passed

Closes sahib#554
@cebtenzzre cebtenzzre linked a pull request Feb 9, 2022 that will close this issue
cebtenzzre added a commit to cebtenzzre/rmlint that referenced this issue Feb 9, 2022
- mktemp in /tmp
- don't assume $0 is a file
- remove stampfiles at exit
- don't create stampfiles if -n is passed

Closes sahib#554
cebtenzzre added a commit to cebtenzzre/rmlint that referenced this issue Aug 7, 2022
- mktemp in /tmp
- don't assume $0 is a file
- remove stampfiles at exit
- don't create stampfiles if -n is passed

Closes sahib#554
@cebtenzzre cebtenzzre linked a pull request Aug 9, 2022 that will close this issue
@cebtenzzre cebtenzzre removed the has-pr label Aug 9, 2022
cebtenzzre added a commit to cebtenzzre/rmlint that referenced this issue Sep 18, 2022
- mktemp in /tmp
- don't assume $0 is a file
- remove stampfiles at exit
- don't create stampfiles if -n is passed

Closes sahib#554
intelfx pushed a commit to intelfx/rmlint that referenced this issue Mar 9, 2023
- mktemp in /tmp
- don't assume $0 is a file
- remove stampfiles at exit
- don't create stampfiles if -n is passed

Closes sahib#554
intelfx pushed a commit to intelfx/rmlint that referenced this issue Mar 9, 2023
- mktemp in /tmp
- don't assume $0 is a file
- remove stampfiles at exit
- don't create stampfiles if -n is passed

Closes sahib#554
intelfx pushed a commit to intelfx/rmlint that referenced this issue Mar 9, 2023
- mktemp in /tmp
- don't assume $0 is a file
- remove stampfiles at exit
- don't create stampfiles if -n is passed

Closes sahib#554
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants