Bug 297733

Summary: Filenames with invalid encoding break delete, rename and other actions
Product: [Applications] krusader Reporter: Christian Pulvermacher <pulvermacher>
Component: generalAssignee: Krusader Bugs Distribution List <krusader-bugs-null>
Severity: critical CC: andreas.weder, bluedzins, cfeck, jan_lepper, krusader-bugs-null, mg
Priority: NOR    
Version: 2.4.0-beta1 "Migration"   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Christian Pulvermacher 2012-04-08 19:05:29 UTC
An example file can be generated by doing the following:
touch `echo -e "testfile\xa0"`

Krusader fails to do anything with the file, including renaming, deleting and (for directories) entering; and instead claims it does not exist. I use UTF8 in both my locale and filesystems.

If the filenames are stored as QStrings, this might be the result of placeholders being substituted for invalid characters. If that's the case, this could also lead to accidental deletion of other files, if the placeholder characters are allowed in file names.
For a file manager, one should probably use the original string of bytes received from the filesystem when performing actions on a file.

The example file can be deleted from the shell via rm testfile<TAB>, or using midnight commander.

I get the same behaviour with Dolphin (1.7 from Debian testing), feel free to reassign the bug to the correct package.
Comment 1 Christian Pulvermacher 2012-04-08 19:13:13 UTC
Interestingly, this used to work in 1.90 (with KDE 3.5.10), or at least my testcase doesn't break.
Comment 2 Christoph Feck 2012-04-10 00:04:35 UTC
> If the filenames are stored as QStrings

They are, since Qt 4.0. See also bug 204768.
Comment 3 Jan Lepper 2012-05-24 16:14:02 UTC

*** This bug has been marked as a duplicate of bug 165044 ***
Comment 4 Maciej Pilichowski 2012-08-16 21:11:45 UTC
*** Bug 149307 has been marked as a duplicate of this bug. ***
Comment 5 Jan Lepper 2013-03-20 09:17:55 UTC
*** Bug 269539 has been marked as a duplicate of this bug. ***