theophanemayaud / video-simili-duplicate-cleaner

https://theophanemayaud.github.io/video-simili-duplicate-cleaner/
GNU General Public License v3.0
51 stars 5 forks source link

cannot delete file in network mounted folder, saying permission problem. #97

Closed chchia closed 1 year ago

chchia commented 1 year ago

specific a folder for trash work... but can't delete directly.

theophanemayaud commented 1 year ago

Hi ! Thanks for the report ! On what operating system are you ? Also, when you manually go to the file and delete it, do you have the permissions ?

chchia commented 1 year ago

Hi I am using Windows 11 with purchased the software from Microsoft Store. image

For example if i did not define the trash folder this error will show when i click Trash, left or right result the same image

but if i do select folder instead of trash, i can then Trash the file but it result in longer time as the folder was a remote network share. image

i hope you can understand what i say, i think you can simply replicate it by add a folder that remote mounted as network storage, and you should know the problem.

thanks.

theophanemayaud commented 1 year ago

Ok thanks for all the details ! I’ll try to check this out this weekend and see what might be the cause.

chchia commented 1 year ago

also could you consider to add auto deletion purely by File age (newer or older) or by File Zize and ignoring the similarity (i know very dangerous unless user are super confidence about the data to be deleted is correctly marked as similar)

and instead of move to trash, you may consider directly delete without moving to trash (again dangerous and user must fully aware what they are doing)

and please allow to save setting, so that user do not need to add folder and set other setting again every time the program is restarted. image

theophanemayaud commented 1 year ago

Ok so I just checked, and I have exactly the same problem : trash when in network drive doesn't work, except when setting a custom location to move the files to instead of the trash. I'm on windows 10. Investigation : As per https://superuser.com/questions/160990/put-files-deleted-over-the-network-into-a-windows-trash-can, there is no trash on network drives. Thus, because the app uses a move to trash function, it will never work on systems with no trash, as per https://doc.qt.io/qt-6/qfile.html#moveToTrash it is the expected behavior.

Idea :

Will keep investigating

theophanemayaud commented 1 year ago

It doesn't seem straightforward to check if the drive has a trash. Therefore, I simply added in the error message that it could be a reason for failing to move to trash. I also added the overall setting, instead of moving to trash or moving to a specified folder, to delete outright. If you have lots of files on a network drive, you can enable this as soon as the update is release by microsoft :) Closed by 22f366c94b4aec91302c38f3f1a9fb8d5ba47c43

theophanemayaud commented 1 year ago

and please allow to save setting, so that user do not need to add folder and set other setting again every time the program is restarted.

By the way I'm also tracking this in #101