stefankueng / CryptSync

CryptSync is a small utility that synchronizes two folders while encrypting the contents in one folder. That means one of the two folders has all files unencrypted (the files you work with) and the other folder has all the files encrypted.
https://tools.stefankueng.com/CryptSync.html
GNU General Public License v3.0
400 stars 72 forks source link

Recycle bin no longer used for delete operations #116

Closed dansyl1 closed 5 months ago

dansyl1 commented 5 months ago

Delete operations still get completed but deleted files do not go to the Recycle bin. I started investigating to fix the issue but I am giving up as presented below.

I believe that SHFileOperation does not support long pathname beginning with \?. According to https://learn.microsoft.com/en-us/windows/win32/api/shellapi/ns-shellapi-shfileopstructa IFileOperation (https://learn.microsoft.com/en-us/windows/desktop/api/shobjidl_core/nn-shobjidl_core-ifileoperation) should be used but its documentation states that IFileOperation can only be applied in a single-threaded apartment (STA) situation. It cannot be used for a multithreaded apartment (MTA) situation. For MTA, you still must use SHFileOperation. It is also unclear if IFileOperation supports pathnames beginning with \?\

Not sure if CryptSync is STA or MTA.

dansyl1 commented 5 months ago

I cannot reproduce the issue. Will re-open when I can