Bug 432509 - Cannot trash files with long names
Summary: Cannot trash files with long names
Status: ASSIGNED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: Trash (other bugs)
Version First Reported In: 6.7.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-04 15:42 UTC by Ilya Bizyaev
Modified: 2025-11-25 07:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Bizyaev 2021-02-04 15:42:43 UTC
SUMMARY
Sometimes a file with a long name cannot be moved to trash.


STEPS TO REPRODUCE
1. Find a JPEG image and call it: "Файл с длинным именем — сам себя не создаст: что происходит, если удалить файл, в имени которого — целое предложение на русском языке.jpeg" (no newlines)
2. Attempt to move it to trash with Dolphin or kioclient5

OBSERVED RESULT
Error message: "Could not write to file /home/user/.local/share/Trash/info/[filename].trashinfo"

EXPECTED RESULT
File is successfully moved to trash

SOFTWARE/OS VERSIONS
Operating System: openSUSE Leap 15.2
KDE Plasma Version: 5.20.90
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Comment 1 Ilya Bizyaev 2021-02-18 13:41:59 UTC
A simpler test case is:
$ touch "уууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууууу.txt"

Here I used Cyrillic 'у'. If I replace it with Latin 'y', the file is trashed as expected, which hints at a wrong byte size limit somewhere.
Comment 2 Ilya Bizyaev 2021-02-18 17:53:09 UTC
The byte size limit is apparently that of ext4: 255 bytes for the filename.

.trashinfo cannot be created because it increases the filename byte size over the limit.

This needs a better error message or a different trash infrastructure that does not require metadata files with longer names.
Comment 3 Bug Janitor Service 2025-11-25 07:55:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/2064