Bug report: Recycle Bin Overflow

Discuss new features and functions
Posts: 6
Joined: 14 Mar 2021

xalaxis

Hi there. Regrattably and sadly I believe I have discovered a FFS bug.

I haven't confirmed this myself yet, but I believe this is what has happened.

In the event you attempt to move more than the recycle bin limit from the FFS GUI, the overflow is silently deleted.
Posts: 6
Joined: 14 Mar 2021

xalaxis

I have now confirmed this is the case. I've lost 35GB of ShadowPlay footage to this bug :(
Posts: 6
Joined: 14 Mar 2021

xalaxis

To reproduce:
T:\ShadowPlay>fsutil file createnew T:\ShadowPlay\testbig 30000000000
File T:\ShadowPlay\testbig is created

T:\ShadowPlay>fsutil file createnew T:\ShadowPlay\testbig2 30000000000
File T:\ShadowPlay\testbig2 is created

T:\ShadowPlay>fsutil file createnew T:\ShadowPlay\testbig3 30000000000
File T:\ShadowPlay\testbig3 is created
Then try deleting these files and notice that with a 44971MB recycle bin only one is saved and the others are silently discarded.
Posts: 6
Joined: 14 Mar 2021

xalaxis

I understand how to make my recycle bin bigger.

When you delete files from within FreeFileSync with the "recycle" option checked and the dialog says "Do you really want to move the following x items to the recycle bin, I would one hundred percent expect this operation to do so.

Do you really think the dialog below should permanently delete files silently?

Image

This is also not the native behaviour of Windows. If the standard file system delete operation was used, the user would be warned with the following dialog:

Image

I urge you, please implement a warning if this was originally intended behaviour. It's too late for me and my memories with friends, but it could save someone else from making the same mistake.
Posts: 5
Joined: 15 Mar 2021

reddevil

Hi there. Regrattably and sadly I believe I have discovered a FFS bug.

I haven't confirmed this myself yet, but I believe this is what has happened.

In the event you attempt to move more than the recycle bin limit from the FFS GUI, the overflow is silently deleted. xalaxis, 14 Mar 2021, 23:27
I too can confirm this recycle bin bug in windows 10.

It also happens all the time if a Synchronize is manually stopped in the middle, the copying stops but deletion does not stop at all until completion (i had to immediatedly end task FreeFileSync_x64.exe to save further deletion of files) and the files that were too big for windows recycle bin were permanently deleted.
Posts: 5
Joined: 15 Mar 2021

reddevil

Hi freefilesync, Please solve this issue.

To others, use the Pause (instead of Stop) when in doubt and end task after.
User avatar
Posts: 3549
Joined: 11 Jun 2019

xCSxXenon

+1
I haven't had this issue, and even though the data is slated for deletion anyway, I think there should be something
Posts: 936
Joined: 8 May 2006

therube

(While not having tested in FFS), I'll +1 this too (assuming what is described above is accurate).


(Similar thread in Everything, LFN deletion.)
Posts: 5
Joined: 15 Mar 2021

reddevil

Easy to reproduce:
Eg...:
1) Mirror Folder A to Folder B with say a few files with size 2gb like abc123_2gb.mkv
2) Set folder B drive's recycle bin limit to 1024mb or 1gb. (Please note the original values to restore later)
3) Now delete abc123_2gb.mkv from A
4) Compare and then Mirror Folder A to Folder B, but click stop within a few seconds.
The files slated for deletion will be in some temporary folder Recyclebin~ffs and then will continue permanent deletion of abc123_2b.mkv despite clicking stop. Files smaller than 1gb will still go to windows recycle bin despite stop button being clicked.

Possible solution: to directly use windows shell and explorer popup itself while deleting anything.
Posts: 5
Joined: 15 Mar 2021

reddevil

This bug in FreeFileSync is still present :(
User avatar
Site Admin
Posts: 7040
Joined: 9 Dec 2007

Zenju

Just for the record, all the behavior described is just standard Windows Recycle Bin. If a file is moved to the recycler, and it's larger than the limit, it's silently deleted. If there's enough space, but the sum of all files in the bin is larger than the limit, then files are silently deleted beginning with the oldest.
None of this logic is coming from FFS. If you want to make sure you keep all your versions, don't use recycle bin, but *versioning*.
Posts: 6
Joined: 14 Mar 2021

xalaxis

Just for the record, all the behavior described is just standard Windows Recycle Bin. If a file is moved to the recycler, and it's larger than the limit, it's silently deleted. If there's enough space, but the sum of all files in the bin is larger than the limit, then files are silently deleted beginning with the oldest. Zenju, 05 Dec 2021, 09:03
This just isn't true, these dialogs have been standard for at least Windows 11, 10, 8 and I believe 7 too.

Image

Image
User avatar
Posts: 3549
Joined: 11 Jun 2019

xCSxXenon

I see both sides. My recycle bin is up to 14GB. If I try to delete more than that all at once, I see this prompt that says it is too big to recycle. BUT, as Zenju says, if I have 12GB worth of data already in my recycle bin and send another 5GB iso to the recycle bin, it removes the oldest data in the recycle bin to make room. Since FFS doesn't do deletions in one big batch, there is no prompt. It's a caveat of FFS being able to delete an amount of data larger than what the recycle bin can hold in a single user action. Maybe it's possible to read that attribute to determine:
if sizeOfDataToDelete > recycleBinLimit
then promptUser
else continue


I see how this isn't a 'fault' of FFS but I also see how it could be unexpected.
Last edited by xCSxXenon on 05 Dec 2021, 17:17, edited 3 times in total.
Posts: 6
Joined: 14 Mar 2021

xalaxis

I see how this isn't a 'fault' of FFS but I also see how it could be unexpected. xCSxXenon, 05 Dec 2021, 15:57
I agree completely with this, I'd love either a prominent warning that the recycle option may silently delete files or some sort of workaround to try and avoid the silent deletion. For me this all stems from the 'confidence' I was given by FFS offering to recycle rather than delete the files like I'd expect, normally I wouldn't think twice about them being deleted.
User avatar
Site Admin
Posts: 7040
Joined: 9 Dec 2007

Zenju

This just isn't true, these dialogs have been standard for at least Windows 11, 10, 8 and I believe 7 too. xalaxis, 05 Dec 2021, 14:34
This is due to an additional check that Windows Explorer does on top of the system API (which would silently delete this file).

FFS could add this check, too, but the to be deleted file being larger than the entirety of space allocated for the recycle bin is too obscure a case. If there is too much risk you might lose important data, you shouldn't use Recycle Bin in first place because it acts like a ring buffer by definition, that will permanently delete the oldest files.
User avatar
Posts: 3549
Joined: 11 Jun 2019

xCSxXenon

If there is too much risk you might lose important data, you shouldn't use Recycle Bin in first place Zenju, 05 Dec 2021, 16:43
I also couldn't agree with this any more that I already do. Microsoft and users tout it as a "safe space" to recover accidentally deleted data, and it certainly can be used that way, but nothing that automatically removes data can be relied upon for that case. I'm sure the ShadowPlay footage wasn't 'important' per se, and maybe more critical data would be handled differently from the start, but I'm also sure that it would be nice if FFS didn't say something is going to happen if it ultimately doesn't, no matter the reason.

Regardless of that, I wonder if it would be an easy compromise to add it as a one-time warning that can be hidden by checking a box like the other warnings. Almost in the same vein as the illegal Linux character issue, I don't think FFS should be changed to fix "bad" behaviors of other developers, but at least in that case it throws an error.
User avatar
Site Admin
Posts: 7040
Joined: 9 Dec 2007

Zenju

but I'm also sure that it would be nice if FFS didn't say something is going to happen if it ultimately doesn't, no matter the reason.xCSxXenon, 05 Dec 2021, 17:28
I agree in general. In this particular case we have a problem with the API that the Windows Recycle bin exposes. No matter what files you give it to, it technically always responds with "OK". There is no way (except for reverse engineering) to know whether it moved files to the recycle bin, or if it has just deleted them. Essentially, it's a black box. So all that can be done about this (sad) state of affairs is to come up with some heuristics to *guess* how the Recycle Bin is likely to behave with a certain input of files. The next question is, how far are you going to go with coming up with an elaborate set of checks.
Posts: 5
Joined: 15 Mar 2021

reddevil

The API that the Windows Recycle bin exposes is not the issue. Other softwares like Teracopy, DigitalVolcano's Duplicate Cleaner, etc... call the window shell directly while deleting files (can even 'undo' via explorer shell) and hence show the proper message popups (same as to deleting files in explorer as shown above). Perhaps FFS could do the same...