Summary: | Cannot delete a file with "invalid" characters in its name | ||
---|---|---|---|
Product: | [Unmaintained] kio | Reporter: | Oliver Putz <Regnaron> |
Component: | general | Assignee: | Fabian <0inkane> |
Status: | RESOLVED DUPLICATE | ||
Severity: | major | CC: | 0inkane, adaptee, adawit, aria, bugseforuns, frank78ac, marcosgdavid, nate, shlomif, Stephan, tosiara |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Screenshot showing files with invalid filename for bug 173097
Empty trash error directory testcase for the bug |
Description
Oliver Putz
2008-10-18 16:38:17 UTC
Ok, it just happened again when I deleted all files in a folder where there were some files with "bad encoded filenames". So I guess it really is related to files which have a filename that is somewhat incorrectly encoded... Created attachment 27999 [details] Screenshot showing files with invalid filename for bug 173097 One more info: I dont know if its important, but all the files that have invalid names appear *twice* in the folder (both times with the same filename). (see attached screenshot) Konsole also sees both files in the folder. I'm reassigning to KIO because KDirLister is where the problem seems to be. Oliver, maybe it would help David (or anyone else who is clever enough to debug this...) if you could say how to create such a file or attach an archive containing a small file with a broken name (assuming that the crash is reproducible if you extract that file on another computer). Thanks Frank for the idea of archiving the files. I already thought about attaching them, but that would have destroyed the filename. Never thought of simply archiving them :-) Anyway, I now uploaded an archive containing one (two) files with invalid filenames tn http://www.oliver-putz.de/bugreports/bug173097InvalidFilenames.tar.bz2 Regrettably I cannot exactly describe how I ended up with the broken filenames in the first place... I often copied these files between different filesystems and between computers with different operating systems that all had different default encodings. (e.g. created it on ISO-8859-15 on reiserfs, copied it to FAT32, moved it from there to another reiserfs with UTF8, from there to another computer with ISO-8859-1, and so on and so forth... I can only guess that at any of these steps something went wrong and the non-ASCII characters got corrupted...) I cannot duplicate the crash. I can how duplicate the problem with deleting or moving the file using dolphin and I think that happens because of URL encoding/decoding issues which needs to be investigated. Do you still see crash in the more recent versions of KDE (v4.6 and up) ? Steps to reproduce delete/rename failure: 0. download sample zip: https://bugzilla.novell.com/attachment.cgi?id=511621 1. open Dolphin 2. right click zip file and select "Extract here" or use unzip: "LANG=en_US.UTF-8 unzip -l test.zip" 3. invalid file appears. 4. rename it 5. get error: The file or folder ���.txt does not exist. Created attachment 74959 [details]
Empty trash error
If you moved a folder with invalid file to trash you won't be able to empty trash anymore
*** Bug 206761 has been marked as a duplicate of this bug. *** Has this bug been (partly) fixed in 4.11? I've got two installations of KDE: Ubuntu with 4.10.5 crashes when deleting a file named "\x94" ArchLinux with 4.11.0 can delete the file but KIO-Slaves (fish) are still broken. The test file was created using -- #!/usr/bin/python fo = open("\x94", "wt") fo.write("\x94") fo.close() -- With 4.11, invalid UTF-8 characters in local filenames are handled better, as long as you use a UTF-8 locale. As for KIO filenames, there are probably many places, where we do not use encodeFilename() to convert back to 8-bit encoding. This may, or may not be a bug (technically, not practically). (In reply to comment #9) > Has this bug been (partly) fixed in 4.11? > I've got two installations of KDE: > Ubuntu with 4.10.5 crashes when deleting a file named "\x94" > ArchLinux with 4.11.0 can delete the file but KIO-Slaves (fish) are still > broken. > > The test file was created using > -- > #!/usr/bin/python > fo = open("\x94", "wt") > fo.write("\x94") > fo.close() > -- As far as I know, kio_fish has no maintainer. I presume you use kio_fish for ssh connection, if so you and everyone else should be using kio_sftp which is actively maintained and should work correctly for your use case. I still have the problem with latest KDE Plasma/Applications/Frameworks stack. I can provide file than can reproduce the problem. It’s a real usability problem that users must use command line to make something with a file. Created attachment 111886 [details]
directory testcase for the bug
This is a directory that after it is deleted, cannot be emptied from the trash / wastebin by dolphin - tested on Mageia x7 x86-64 with kf5/plasma5. Annoying.
A few days ago I could not delete nor open a vídeo file containing an invalid character in its name on Arch Linux, Dolphin 17.12.3, frameworks 5.44. Dolphin shown the error "file not found". Could be solved with bug 204768, while the underlying real issue (bug 165044) cannot be fixed, see bug 165044 comment #159. link from comment 159 gives "page not found". Why can pcmanfm-qt delete/rename a file containing invalid character and Dolphin not? @Dr. Chapatin: The new link would be http://doc.qt.io/qt-5/qfile-obsolete.html#setEncodingFunction . Basically the Qt project considered the function flawed, and it does nothing anymore in Qt 5. Thus, with Qt it is pretty much impossible to handle non-unicode filenames. I wrote a bit in a mail about this at https://mail.kde.org/pipermail/kde-frameworks-devel/2018-April/061092.html Now why does pcmanfm-qt handle this case? Well, pcmanfm-qt doesn't use KIO or Qt's file handling functionality, but instead uses libfm-qt, which wraps the from GIO. GIO is GTK+'s input/output abstraction library, and it happens to be file encoding agnostic. Unfortunately, it is not possible to simply switch out KIO with GIO in Dolphin, without a massive rewrite of the application; and even if we did it, we might lose some functionality that GIO in turn lacks and that KIO provides. *** This bug has been marked as a duplicate of bug 204768 *** |