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
Is your feature request related to a problem? Please describe.
When trash-empty runs for a long time it's possible that files are deleted sooner than expected (trash-empty running concurrently to a process which uses trash-put).
This might seem like a rare edge-case but in my workflows it is an hourly occurrence. It defeats the purpose of a recycle bin if the files are deleted prior to me running trash-empty for the next batch of files.
Describe the solution you'd like
I imagine that you could modify the DeleteAccordingDate class to check against a module const. For example:
If something is trashed after APPLICATION_START, then Emptier would ignore that file.
Describe alternatives you've considered
Of course, I could run trash-empty less often, but the context here is an automated workflow and trash-cli fits in very well with the exception of this issue and this seems like it would be an easy fix.
Additional context
trash --version
0.22.10.20
The text was updated successfully, but these errors were encountered:
chapmanjacobd
changed the title
trash-empty: option to only empty files deleted prior to application start
trash-empty: option to only empty files trashed prior to application start
Oct 24, 2023
But you should also consider the case when parse_deletion_date() returns None.
The application start can be detected in EmptyAction.run_action() at can be passed as a parameter to the emptier.do_empty() function.
Is your feature request related to a problem? Please describe.
When trash-empty runs for a long time it's possible that files are deleted sooner than expected (trash-empty running concurrently to a process which uses trash-put).
This might seem like a rare edge-case but in my workflows it is an hourly occurrence. It defeats the purpose of a recycle bin if the files are deleted prior to me running
trash-empty
for the next batch of files.Describe the solution you'd like
I imagine that you could modify the
DeleteAccordingDate
class to check against a module const. For example:If something is trashed after APPLICATION_START, then
Emptier
would ignore that file.Describe alternatives you've considered
Of course, I could run trash-empty less often, but the context here is an automated workflow and trash-cli fits in very well with the exception of this issue and this seems like it would be an easy fix.
Additional context
The text was updated successfully, but these errors were encountered: