Sync Tool: Delete to Recycle Bin ignores Recycle Bin Limit
Moderators: white, Hacker, petermad, Stefan2
Sync Tool: Delete to Recycle Bin ignores Recycle Bin Limit
Hello,
I am using TC 11.01 and I found the following bug:
The Recycle Bin on my drive "D:" has a limit of 100 GB.
With the Sync Tool I was trying to delete 260 GB. TotalCommander silently deleted 100 GB to the Recycle bin and the other 160 GB were deleted for real. The data is lost and cannot be recovered.
Solution: TotalCommander should warn the user that the Recycle Bin Limit has reached and should ask wheather the user should continue to delete (without recovery) or stop the sync procedure.
What do you think?
I am using TC 11.01 and I found the following bug:
The Recycle Bin on my drive "D:" has a limit of 100 GB.
With the Sync Tool I was trying to delete 260 GB. TotalCommander silently deleted 100 GB to the Recycle bin and the other 160 GB were deleted for real. The data is lost and cannot be recovered.
Solution: TotalCommander should warn the user that the Recycle Bin Limit has reached and should ask wheather the user should continue to delete (without recovery) or stop the sync procedure.
What do you think?
- ghisler(Author)
- Site Admin
- Posts: 48125
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Sync Tool: Delete to Recycle Bin ignores Recycle Bin Limit
This has worked previously, but it seems that Microsoft now requires a new flag FOF_WANTNUKEWARNING which must be set to get a warning when a file is too big and FOF_NOCONFIRMATION is set. Previously Windows would ask via IFileOperationProgressSink interface function PreDeleteItem whether a file should be deleted directly or not, but this seems to no longer work (bug in Windows).
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 48125
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Sync Tool: Delete to Recycle Bin ignores Recycle Bin Limit
This bug was only fixed in Total Commander 11.03 RC2, and only on Windows 10 and 11. Here is how to reproduce the error:
1. Important: Only make these tests with copies of files in a temporary folder, not with important files!
2. Copy a few files (at least 2!) to an empty directory. The total size of these files must be more than 100 MBytes
3. Right click on the "F8 Delete" button and choose "Properties"
4. Change the Recycle bin limit to 100 MBytes, it must be smaller than the total size in step 2
5. Perform the following tests first with Total Commander 11.02, and then with 11.03 RC2:
6. Select all the files you created in step 2
7. Press DEL to delete them to recycle bin -> The dialog box should ask whether to delete the selected files to recycle bin
8. Confirm the delete confirmation dialog
-> TC 11.02: Windows will warn that an unknown error has occurred. Do NOT click "Retry", or the file will be permanently deleted! This is a Windows bug.
-> TC 11.02 RC2: Total Commander will check the size of the recycle bin in the registry and warn that it could no delete at least one file to recycle bin, and offer to delete the files directly.
Btw, the Explorer also shows that it could not delete the files to recycle bin, but this function isn't correctly implemented in the function which third party apps can call.
1. Important: Only make these tests with copies of files in a temporary folder, not with important files!
2. Copy a few files (at least 2!) to an empty directory. The total size of these files must be more than 100 MBytes
3. Right click on the "F8 Delete" button and choose "Properties"
4. Change the Recycle bin limit to 100 MBytes, it must be smaller than the total size in step 2
5. Perform the following tests first with Total Commander 11.02, and then with 11.03 RC2:
6. Select all the files you created in step 2
7. Press DEL to delete them to recycle bin -> The dialog box should ask whether to delete the selected files to recycle bin
8. Confirm the delete confirmation dialog
-> TC 11.02: Windows will warn that an unknown error has occurred. Do NOT click "Retry", or the file will be permanently deleted! This is a Windows bug.
-> TC 11.02 RC2: Total Commander will check the size of the recycle bin in the registry and warn that it could no delete at least one file to recycle bin, and offer to delete the files directly.
Btw, the Explorer also shows that it could not delete the files to recycle bin, but this function isn't correctly implemented in the function which third party apps can call.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 48125
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Sync Tool: Delete to Recycle Bin ignores Recycle Bin Limit
Can anyone test this, please? Just follow my steps above.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Sync Tool: Delete to Recycle Bin ignores Recycle Bin Limit
I now have tested it with Tc11.02 and with Tc11.03rc2, both versions tested with 32 and 64bit and all four TCs also as admin.
It works in Tc11.02 and in Tc11.03rc2 as you have described it. In Tc11.03rc2 the TC now checks the sizes itself and warn.
It works as expected. Perfect.
It works in Tc11.02 and in Tc11.03rc2 as you have described it. In Tc11.03rc2 the TC now checks the sizes itself and warn.
It works as expected. Perfect.
- ghisler(Author)
- Site Admin
- Posts: 48125
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Sync Tool: Delete to Recycle Bin ignores Recycle Bin Limit
Great, thank you very much for testing this! It took quite a lot of time to find a solution.
Don't forget to change your recycle bin limit back to a larger number!
Don't forget to change your recycle bin limit back to a larger number!
Moderator message
Moved to fixed bugs
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Sync Tool: Delete to Recycle Bin ignores Recycle Bin Limit
Yes, I did that (restored the size).ghisler(Author) wrote: ↑2024-02-02, 08:13 UTC Don't forget to change your recycle bin limit back to a larger number!
I remembered (write it down) the number in the field and then restored that number (the size).
2all
But, I was a bit surprised that a real size was there beforehand (on this computer: 25857 MB).
Is it common for that field to have a specific number there, or should it be without a number for a unlimited and dynamic adjusted?
- ghisler(Author)
- Site Admin
- Posts: 48125
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Sync Tool: Delete to Recycle Bin ignores Recycle Bin Limit
Windows sets the default size of the recycle bin to about 5% of the drive size. The actual number does not really matter. If you drive is not very full, you can set it to a larger size for additional protection.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Sync Tool: Delete to Recycle Bin ignores Recycle Bin Limit
Thanks for the information. Theme accomplished now.ghisler(Author) wrote: ↑2024-02-02, 09:11 UTC Windows sets the default size of the recycle bin to about 5% of the drive size. The actual number does not really matter. If you drive is not very full, you can set it to a larger size for additional protection.