Summary: | Copy error for folders with mixed files & folders in Split View | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Chuck <cfox04> |
Component: | general | Assignee: | David Faure <faure> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | 2rb0alex, andysem, cameronpoe, cesarg9, chris.rapson, cloutier.jo, cyberbeat, drajdoyle, elvis.angelaccio, emmanuelpescosta099, germano.massullo, get.sonic, hrvooje, info, just89, kde-bugs.9ek5t, kdelibs-bugs, kilbertphone, patrick.rifici, pedron.alexandre, reuben_p, rlaggren, s, schnere, serhiy.int, setingo, simonandric5, trent2, wulf.richartz |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kio/6005183a0af0e46b0f5ebd40eabaf343d2506ee6 | Version Fixed In: | 5.22 |
Sentry Crash Report: | |||
Attachments: | video showing error |
Description
Chuck
2015-09-25 20:09:50 UTC
Thanks for the bug report!
> Error: "[pathname of source Subdir] is a folder, but a file was expected" Note:
> Individual files can still be copied, but directory folders throw the error seen abov
Dolphin uses KIO to copy files, I'll reassign it to KIO.
Emmanuel, which KIO method is being called in such a case? This error sounds like KIO::file_copy is called instead of KIO::copy, possibly. Either that there's a porting bug in KIO, of course. You can mark as confirmed since there are many affected people, included me plasma-desktop-5.4.3-1.fc23.x86_64 kf5-kio-core-5.16.0-2.fc23.x86_64 I need more step-by-step instructions to reproduce the bug reliably. I tried a number of variants of copying dir+file from left view to right view (using DnD and then choosing Copy in the popupmenu), no error occured. There must be something more specific to trigger the bug... It is extremely hard to reproduce, for me it seems to happen simply from time to time. I've just tested many copy situations, and when I finally got the error (I deleted a folder, and then copied another folder from the same directory), I could not reproduce it later after restart of dolphin, doing exactly the same actions. I can reproduce the bug everytime with both sftp and smb connections in one of the panes. This is what i do: * Open split view * Open a network connection in one of the panes, for example a smb shared folder or just sftp://localhost/some_folder * Create a new folder in the local view using any name. * Create a file (or use an existing one) and move/copy it to the newly created folder. * Drag the folder to the smb/sftp pane and choose copy/move. Basically the trigger is to copy/move a file to a folder in one pane before moving that folder to the other pane. happens to me, when I try to copy to a mounted NTFS USB-Drive Happens w/in same Dolphin window. Copy dir from tree in home directory (using mouse/context menu) paste by rt-clk on target in different part of the home/(tree). Target can be either in the folder panel or the file list pane; in the file list pane it errors regardless whether the target is a directory or if you click and past "in the field" to paste into the dir currently displayed level. More detail: First time I have see this; I've used Dolphin regularly w/this distro version for about 6 weeks since upgrading the distro. The dir I attempt to copy contains only files (no dirs) - 800+ jpg's, about 69MB total. I had just created the source dir (a dir for working purposes) on the tree and pasted the files into it in one batch from my dl dir (where the files comprised the total contents of that dl dir and I selected all of them at once) using rt-clk/cut and then rt-clk/paste to the list pane of the newly created working dir. So far good. I then was attempting to copy that working dir and paste it into another folder for backup purposes and got the error. Suse LEAP 42.1 (upgraded from suse 12.2) Kde et al, is standard distro install I can't reproduce it anymore :-? What I did besides installing and updating a lot of stuff: I deleted ~/.config/mimeapps.list and ~/.local/share/applications/mimeapps.list with a lot of xfce-garbage in it (In reply to Wulf from comment #10) > I can't reproduce it anymore :-? Sorry wrong. It' reproducible - two panes (one pane is my external NTFS USB Drive) - in the other pane a folder with two different kinds of files (media and text) - you expand the this folder (you don not change into this folder) - you move the text file to trash - you try to copy the folder (now with only one expanded media-file) per drag and drop to the external pane - error occurs Created attachment 96647 [details]
video showing error
video showing how to reproduce error
error: "is a folder but a file was expected" I can reproduce when moving large files (or groups) if: Using Dolphin (v15.12.0) split window, copying a file. From left side window, copy to right side a large file(or group) that does not exist. then while that is copying, load a different drive/location in the original left side of window. (file is still copying) When notification of copy is complete, take now completed file from right side. and try to copy to left (where the new location is) and then the error occurs. error pops up "xxxxx.xxx is a folder but a file was expected" KDE openSUSE Leap 42.1 I hit this bug while doing something exactly as described in comment #13. Fedora 23 x86-64, Dolphin Version 15.08.1 KDE Frameworks 5.18.0 Qt 5.5.1 (built against 5.5.1) I have the same Problem: Copy a folder from local drive to sftp. Opening two windows works fine! Only the splitview has a problem. Using: Ubuntu 15.10 Dolphin Version 15.08.2 KDE Frameworks 5.18.0 Qt 5.5.1 (built against 5.5.1) i can reproduce it without the splitview: 1. create a tmp folder 2. inside the tmp folder create two folders: a and b 4. move b inside a (dnd) 5. try to copy folder a 6. error Opening two windows works fine Kubuntu 15.10 Dolphin 15.08.2 KDE Frameworks 5.15.0 Qt 5.4.2, built agains 5.4.2 (In reply to Kai Dombrowe from comment #16) I can reproduce this at will on Fedora too. Fedora 23, x86-64 Dolphin 15.12.1 KDE Frameworks 5.19.0 Qt 5.5.1 (built against 5.5.1) I was able to reproduce the bug using Kai's tmp-folder steps. That might be an easier way to get closer to the root cause of the bug since it is easily reproducible and only requires one dolphin pane to be open. I can reproduce it as well using the steps in comment #16. maybe a cache bug in KCoreDirLister? : it works if i replace (kio/src/core/copyop.cpp @ void CopyJobPrivate::statCurrentSrc()) const KFileItem cachedItem = KCoreDirLister::cachedItemForUrl(m_currentSrcURL); with: const KFileItem cachedItem; // Null (In reply to David Faure from comment #2) > Emmanuel, which KIO method is being called in such a case? > > This error sounds like KIO::file_copy is called instead of KIO::copy, > possibly. > > Either that there's a porting bug in KIO, of course. KIO::paste is being called, see DolphinView::pasteToUrl. (In reply to Kai Dombrowe from comment #20) > maybe a cache bug in KCoreDirLister? : Thanks for debugging :) I came to the same conclusion, but I didn't have time to further debug the caching stuff and write a test case for it. (In reply to Kai Dombrowe from comment #16) > i can reproduce it without the splitview: > > 1. create a tmp folder > 2. inside the tmp folder create two folders: a and b > 4. move b inside a (dnd) > 5. try to copy folder a > 6. error > > Opening two windows works fine > > Kubuntu 15.10 > Dolphin 15.08.2 > KDE Frameworks 5.15.0 > Qt 5.4.2, built agains 5.4.2 I can reproduce this too. It first happend to me when I tried to copy a large amount of data to smb. 7 months and still not fixed? This is important, big bug in file manager. Git commit 4daa10cca05ccd990167581dc1d2b17c371a1384 by David Faure. Committed on 17/04/2016 at 21:58. Pushed by dfaure into branch 'master'. First attempt at a unittest for bug 353195. It passes though, so something must be missing (maybe waiting for the cache to be updated?). To be continued. M +25 -0 autotests/kdirlistertest.cpp M +1 -0 autotests/kdirlistertest.h http://commits.kde.org/kio/4daa10cca05ccd990167581dc1d2b17c371a1384 Got the test to work (i.e. fail) this morning. I'll finish fixing this after work. Git commit 6005183a0af0e46b0f5ebd40eabaf343d2506ee6 by David Faure. Committed on 19/04/2016 at 20:55. Pushed by dfaure into branch 'master'. Fix regression in KFileItem: refresh() would lose the file type, so a dir became a file. Many thanks to Kai Dombrowe for the simple and fully reproduceable steps (which are now coded in the unittest). CCMAIL: markg85@gmail.com Mark, this is why existing code should be refactored (i.e. moved) rather than replaced. See also the BUG comment below, I think we have to stop using this constructor. FIXED-IN: 5.22 M +8 -2 autotests/kdirlistertest.cpp M +11 -0 autotests/kfileitemtest.cpp M +1 -0 autotests/kfileitemtest.h M +3 -1 src/core/udsentry.cpp http://commits.kde.org/kio/6005183a0af0e46b0f5ebd40eabaf343d2506ee6 *** Bug 355115 has been marked as a duplicate of this bug. *** *** Bug 365216 has been marked as a duplicate of this bug. *** *** Bug 365043 has been marked as a duplicate of this bug. *** *** Bug 362840 has been marked as a duplicate of this bug. *** *** Bug 357539 has been marked as a duplicate of this bug. *** I just got this error message in a situation similar to comment 16. I copied a folder, changed the contents, and then tried to copy it again - all in the same parent folder. (And all in the same dolphin window with only one pane open.) Since this was marked resolved over a year ago, am I seeing the same bug or something new? I'm running Ubuntu 16.04.2 LTS. Kernel 4.4.0-89-generic Please ask in a forum of your distribution how to install the backport PPAs with newer KDE software. |