Version: 2.0 (using KDE 4.8.0) OS: Linux Copying files into the open view after the current folder got renamed fails with access denied error Reproducible: Always Steps to Reproduce: 1. open any folder 2. use the folder sidebar to rename that one 3. try to drag a file (from desktop or another dolphin window, etc.) into the white area of the main view thing Actual Results: Error: Access denied, can't write into folder <old folder name> Expected Results: file should be copied into the renamed folder tested with symbol view
Thanks, I could reproduce the issue.
Resetting assignee to default as per bug #305719
Review-request: https://git.reviewboard.kde.org/r/107070/
Created attachment 75453 [details] Proposed KDirLister unit test Emmanuel found out (see discussion in the review request) that the root cause of this bug is apparently that KDirLister::rootItem() does not return a KFileItem corresponding to the new view URL after the rename operation. This is a unit test for KDirLister which demonstrates this.
(In reply to comment #4) > Created attachment 75453 [details] > Proposed KDirLister unit test > > Emmanuel found out (see discussion in the review request) that the root > cause of this bug is apparently that KDirLister::rootItem() does not return > a KFileItem corresponding to the new view URL after the rename operation. > This is a unit test for KDirLister which demonstrates this. Any updates about KDirLister::rootItem() fix?
I thought again about your earlier idea to use "m_model->fileItem(destUrl);" to determine the KFileItem for the drop target: https://git.reviewboard.kde.org/r/107070/diff/2/#index_header This will just make the destItem a null KFileItem if something is dropped in the empty space in the view (note that the KFileItemModel does actually not contain a KFileItem for its own URL). This means that the checks in QString DragAndDropHelper::dropUrls(const KFileItem& destItem, const KUrl& destUrl, QDropEvent* event) are circumvented and KonqOperations::doDrop is called directly. The problem is that you can then actually drop items in folders which you can't write to (you will get an error dialog from KIO), or you can drag a folder from the Folders Panel and drop it in itself (which fails silently). So I would prefer to have this fixed in KDirLister, or we have to find another kind of workaround.
Git commit 8141788c819fa0bcfba7cfaca474095ca819a130 by David Faure. Committed on 21/12/2012 at 21:06. Pushed by dfaure into branch 'KDE/4.9'. Fix KDirLister's rootItem not being updated when renaming the directory. The root item kept having the old URL. Thanks to Emmanuel for the bug investigation, and to Frank for the unittest! FIXED-IN: 4.9.5 M +4 -1 kio/kio/kdirlister.cpp M +27 -0 kio/tests/kdirlistertest.cpp M +1 -0 kio/tests/kdirlistertest.h http://commits.kde.org/kdelibs/8141788c819fa0bcfba7cfaca474095ca819a130