Bug 334535

Summary: display and internal use of a wrong file name (the new name) after trying to rename a file with a too long name (results in an error)
Product: [Frameworks and Libraries] frameworks-kio Reporter: realnobody <kdespam34fb987>
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: bugseforuns, frank78ac, kdelibs-bugs-null, nate
Priority: NOR    
Version First Reported In: 5.45.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description realnobody 2014-05-08 22:30:42 UTC
dolphin displays and seems to use (internally) a wrong file name (the new name) after trying to rename a file into a too long name (which results in an error)

Reproducible: Always

Steps to Reproduce:
1. have a file on EXT4.
2. start rename - hit F2
3. paste this too long name (316 chars) into the inline rename box: xxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxx xxxxx xxxxxxxxxxxxxxxxxxxxxxxx
4. enter
Actual Results:  
error dialog box ("The file myfilenamehere canot be renamed" - in German in my UI) is shown and file appears with the new name. Doing anything in dolphin (e.g. copying) with the file does not work ("file not existent!"). In fact the file was not renamed (confirmed by a shell window and ls). Apparently dolphin thinks it was renamed. After a F5 refresh the old name is shown again, correct.

Expected Results:  
error dialog box and the old name is still shown

background info: This is a ext4 file system (255 Bytes allowed for file name only), this is the cause for the correct error dialog box.
Comment 1 Frank Reininghaus 2014-05-11 21:12:28 UTC
Thanks for the bug report. Dolphin does have support for noticing that renaming fails, see bug 319119. I have verified that this still works if renaming fails because of a name conflict.

It seems that the job created by KIO::moveAs does not report the error properly in the "renaming fails because the file name is too long case".
Comment 2 Nate Graham 2018-05-03 19:49:48 UTC
Still an issue in KDE Frameworks 5.45.