Bug 407151

Summary: Gwenview cannot move files to trash
Product: [Applications] gwenview Reporter: Kishore Gopalakrishnan <kishore96>
Component: generalAssignee: Gwenview Bugs <gwenview-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: nate
Priority: NOR    
Version First Reported In: 19.04.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot showing error.

Description Kishore Gopalakrishnan 2019-05-02 08:59:54 UTC
Created attachment 119794 [details]
Screenshot showing error.

SUMMARY
When I try to 'delete' (move to trash) a file, gwenview gives me the error "an older item named 'trash:/' already exists", and wants me to rename (!?) the trash folder

STEPS TO REPRODUCE
1. When viewing an image in Gwenview, press the 'delete' key

OBSERVED RESULT
Gwenview asks me to rename the trash folder (see attached image)

EXPECTED RESULT
Gwenview should move the image to the existing trash folder.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.3

ADDITIONAL INFORMATION:
Deleting works properly in Dolphin, so it does not seem to be an issue with the trash folder itself.
Comment 1 Nate Graham 2019-05-02 22:53:04 UTC
Very strange. It works fine for me in Gwenview 19.04. What is the path and filename of the file you're trying to delete from Gwenview? Is it possible that there's already a file in the trash with the same filename?
Comment 2 Kishore Gopalakrishnan 2019-05-03 03:41:23 UTC
The path to the particular file I used to test this was `/home/kishore/Downloads/testimg.jpg`. However, this issue doesn't seem to be related to the path, as I can reproduce this with images in other locations too.

There are no files in Trash with the same name. I can delete the same file without any problems in Dolphin. I'll try to test this in a new user and report back.
Comment 3 Kishore Gopalakrishnan 2019-05-03 04:42:34 UTC
Hmmm... It works properly in a new user (I should've checked before reporting). Any idea on what config files I could try clearing?

I tried removing `.local/share/Trash` and letting Dolphin create a new one by deleting a file. I can still reproduce the issue (Dolphin can move images to Trash, but Gwenview can't).
Comment 4 Nate Graham 2019-05-03 18:00:23 UTC
How peculiar. Thanks for the additional info. Let me know if you manage to isolate a reproducible case!
Comment 5 Kishore Gopalakrishnan 2020-10-18 04:57:37 UTC
Marking as resolved since I can no longer reproduce it on my new laptop.