Summary: | Moving directories: skip on encoding error results in data loss | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kio | Reporter: | Jerome <heninj> |
Component: | general | Assignee: | David Faure <faure> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Mandriva RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Jerome
2009-03-22 17:35:38 UTC
Is the source dir really deleted, or does F5 (Reload) bring it back? I'm currently debugging this with the following testcase: mkdir source; cd source; d=`echo latin1:é | recode u8..l1`; mkdir $d; touch $d/file1 And moving that directory to another partition (e.g. from $HOME to /tmp). I don't even get an error message during the operation, but I see kio_file reporting errors. Looks like a bug in the error handling, I'll investigate. But since kio_file fails at deleting the source dir anyway, I don't see a data loss. SVN commit 944994 by dfaure: Don't make the source dir "disappear" (visually, it was still there on disk) if there was an error while removing one of its subdir (e.g. wrong encoding). This fix will be in 4.2.2 (just in time). BUG: 187868 This is a more refined version of the fix for #118593 (retested, still works). CCBUG: 118593 M +4 -4 copyjob.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=944994 David: sorry about the imprecision in the first report. Here is a simpler view of the problem, which may or may not be solved by your fix. In any filesystem, I do this: d=`echo testé | recode 'u8..l1'`; mkdir $d; touch $d/data Whatever I do, dolphin or konqueror will not display the contents of that directory, refreshing doesn't help. So it looks like the problem was unrelated to the "move" operation: the source directories would have seemed empty from the beginning, even though they weren't. This is correct. KDE (Qt, in fact) does not support non-utf8 filenames on a utf8 locale. My fixes were merely so that the copy/move operations don't do nonsensical things upon error. But I cannot fix the fact that a folder with such a name is not usable in KDE. I see. The problem is, that may not be obvious to the user: instead the most obvious conclusion is "this directory is empty". Konqueror is a bit more helpful that dolphin on this, because it pops up an error message "directory XXX does not exist", so the user does not expect normal behavior. Instead, dolphin displays the error in the status bar, in a pretty discrete way that is easy to miss. I would suggest the following improvement: the directory should not appear to be open (and empty) if its contents are actually not accessible to kio. for example, the location bar should not show the path to that directory, etc, to make it clear that the file manager cannot access that location. Does that sound reasonable? Should I submit this as a feature request for dolphin? I see. I was testing in konqueror, of course. A dolphin wish sounds like a good idea indeed. |