Summary: | After renaming file with name exists in its folder and cancelling folder view does not updates. | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Melkozerov Alexander <alexander-melkozerov> |
Component: | general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | emmanuelpescosta099, wstephenson |
Priority: | NOR | Keywords: | reproducible |
Version: | 2.1 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kde-baseapps/7cff47b01254f35bf413eac5d9d336f77c6f5fd9 | Version Fixed In: | 4.9.3 |
Attachments: | Work-in-progress patch |
Description
Melkozerov Alexander
2012-07-18 14:06:22 UTC
Thanks for the bug report, I can confirm this problem. Very strange, but I hope it's not hard to fix. The problem is that DolphinView::slotRoleEditingFinished() changes the file name in KFitemModel before KonqOperations::rename() (the function which does the actual renaming and shows the dialog if necessary) gets called. I think there's no good way to find out what KonqOperations::rename() actually did. I think the best way to fix this might be to check in DolphinView::slotRoleEditingFinished() if a file with a new name is already in the model and not call KFileItemModel::setData() in that case. The dir lister should notify the model then when the renaming has happened. Resetting assignee to default as per bug #305719 *** Bug 307074 has been marked as a duplicate of this bug. *** Created attachment 74069 [details]
Work-in-progress patch
This fixes it in principle, but leads to other problems because lots of "Already exists" dialogs pop up. Needs more work :-(
The bug only appears with inline renaming. Renaming the file with the Rename Dialog works fine for me. Yes, that's because the DolphinView updates the file name only in the "Rename inline" case. When using the dialog, the file name update is done when we receive the dir lister's signal. I think my patch from comment 5 might work fine if the "multiple signal connections/no disconnections" issue that we're discussing in https://git.reviewboard.kde.org/r/107070/ is resolved. Git commit 7cff47b01254f35bf413eac5d9d336f77c6f5fd9 by Frank Reininghaus. Committed on 31/10/2012 at 23:06. Pushed by freininghaus into branch 'KDE/4.9'. Do not show an incorrect file name after a failed rename operation FIXED-IN: 4.9.3 M +12 -3 dolphin/src/views/dolphinview.cpp http://commits.kde.org/kde-baseapps/7cff47b01254f35bf413eac5d9d336f77c6f5fd9 |