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

Vacuum may delete a directory without putting it into the recycle bin #81

Open
ForNeVeR opened this issue Apr 4, 2023 · 3 comments
Open
Labels

Comments

@ForNeVeR
Copy link
Owner

ForNeVeR commented Apr 4, 2023

Today, I've noticed that while removing a directory T:\Temp\Rider2023.1 (18.49 GiB), Vacuum has deleted it entirely, and not moved to the recycle bin.

Some hypothesis on what could cause that behavior:

  • the directory is too big to be put into the recycle bin
  • some files are too big
  • some paths are too long

Normally, Windows Shell will ask the user what to do, but it's possible that some flags we are passing to it lead to just deleting the directory in case of questions.

Deserves further investigation.

@ForNeVeR ForNeVeR added the bug label Apr 4, 2023
@ForNeVeR
Copy link
Owner Author

Steps to reproduce:

$ md T:\Temp\vac-wsp
$ cd T:\Temp\vac-wsp
$ fsutil file createnew test 18000000000 # creates a file of 18 GB in size
$ vacuum -d T:\Temp\vac-wsp # deletes the file without putting it into the recycle bin
Removing file T:\Temp\vac-wsp\test… ok

@ForNeVeR
Copy link
Owner Author

Here's what it says if I'm trying to recycle it manually.

image

@ForNeVeR
Copy link
Owner Author

Alright, the current plan will be to use IFileOperation manually (perhaps extract it into a reusable library later), and try handling the results.

Ideally, we'd want to properly handle the deletion states: by default, do not delete such a file and properly detect the status, and only force-delete it if called with --force.

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

No branches or pull requests

1 participant