Bug 430313

Summary: Trash can not handle a file with a specific name
Product: [Frameworks and Libraries] frameworks-kio Reporter: Patrick Silva <bugseforuns>
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: kdelibs-bugs-null, nate
Priority: NOR    
Version First Reported In: 5.77.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: archive

Description Patrick Silva 2020-12-12 18:10:37 UTC
Created attachment 134038 [details]
archive

STEPS TO REPRODUCE
1. download the attached archive and extract it with Dolphin:
right-click on the downloaded archive, hover over "Extract > choose "Extract archive here".
A folder called "bad" is extracted.
2. try to send the file inside "bad" folder to Trash: Dolphin shows "The file or folder /path/to/file/filename does not exist." inline error
3. send "bad" folder to Trash
4. try to empty Trash: Dolphin shows "Could not remove folder /path/to/trash/files/bad."
error message

EXPECTED RESULT
Dolphin should send any file to Trash and Trash should always be successfully emptied

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.20.4
KDE Frameworks Version: 5.77.0
Qt Version: 5.15.2
Comment 1 Nate Graham 2020-12-17 18:37:10 UTC
Huh, it works for me with this folder!
Comment 2 Nate Graham 2020-12-17 18:38:11 UTC
Ah, I spoke too soon. While I can put that folder in the trash and take it out, trying to empty the trash with it inside produces an error saying "Could not delete file /home/nate/.local/share/Trash/files/bad/bad."

So there is something odd about this folder, for sure.
Comment 3 Nate Graham 2020-12-17 18:38:59 UTC
It's not just the trash either. I can't perform a delete operation on it from outside the trash
Comment 4 Christoph Feck 2020-12-18 11:10:18 UTC
The apostrophe in "America's Town" is not UTF-8 encoded, but a single 0xDE byte (which isn't even a Latin character). Dolphin can rename and delete the file, but the Trash doesn't have code for handling broken filenames.

*** This bug has been marked as a duplicate of bug 413834 ***
Comment 5 Christoph Feck 2020-12-18 11:13:22 UTC
Excuse me, the 222 value was not decimal, but octal, which is 0x92, and indeed a single quotation mark in extended (Windows) Latin code pages.