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
Improve deletion of the Sandboxie folder #3044
Conversation
@sredna Any feedback or input would be greatly appreciated. |
9db79be
to
c68bbf7
Compare
RMDir (without /r) only deletes a directory if it is empty, you don't need a function. If it failed to delete then maybe something has a open handle, maybe call RMDir and Sleep in a loop while IfErrors is true after RMDir. Give up after 5 seconds. Process Monitor will tell you why the delete fails. DeleteDirIfEmpty is also broken, the returned order of . and .. is undefined. |
c68bbf7
to
e5ace88
Compare
I've just tried, but I'm unable to reproduce this issue consistently. However, I would still like to provide a minimal fix that doesn't break anything.
Please check my refreshed commit. Also, I would like to know if setting a |
You need a clearerrors before the first of the two rmdir's.
It will not hurt anything. It is used because it calls SetCurrentDirectory and the current directory holds a handle. If the current directory was the problem then it should happen every time. Your code is a bit strange with everything in functions and no uninstaller section? |
e5ace88
to
e36d819
Compare
Thanks for your report, a new commit was pushed.
Frankly I'm not sure what was the intention of the original developer, basically the code now belongs to the Sandboxie community: https://news.sophos.com/en-us/2020/04/09/sandboxie-is-now-an-open-source-tool/ What we're missingI think what we really miss at this time is the compatibility support, especially with UWP apps, and at least an independent security audit provided by a security research team... and yet, in spite of everything, over 20 security issues were fixed internally since the open-source release, but it's a bit unfair that other open-source software like Veracrypt receive more public attention in this regard than Sandboxie. |
The uninstaller of Sandboxie Classic tends to leave the Sandboxie installation folder as empty in some cases, so I would suggest to further improve the deletion.