When inline-renaming a file and renaming fails (in this case: "Too many connections from this IP" error), Dolphin doesn't notice it and shows the new name and doesn't let you rename the file again until you refresh the view.
Steps to Reproduce:
1. Open a remote location
2. Try to rename file "foo" to file "bar" (and somehow make it fail by pluggin out the cable or so)
File is still shown as "bar" and pressing F2 or using the Rename context menu entry doesn't work
File is shown as "foo"
I guess this only happens if the renaming itself fails, if Dolphin knows in beforehand that you cannot rename it (ie. insufficient permissions) it doesn't even enter edit more in the first place.
Yes, confirmed. The problem is that DolphinView::slotRoleEditingFinished() changes the data in the model *before* the actual renaming is performed by KonqOperations/KIO. We could in principle remove the call
and wait for the notification from the dir lister telling us that the file name has changed, but this approach would have two different problems:
(a) After finishing inline renaming, the old name reappears for a brief moment until the dir lister's signal is received.
(b) If there is nothing like inotify that tells the dir lister about changes in the file system (like when viewing remote folders and renaming items there), the name would not be updated at all.
Therefore, fixing it is not straightforward and is probably not possible without modifications in KonqOperations and/or KIO.
Git commit 0d0b9583daedce0eec06e18db1c8533d26bffe78 by Emmanuel Pescosta.
Committed on 10/06/2013 at 11:16.
Pushed by emmanuelp into branch 'master'.
Fix Bug 319119 - Dolphin doesn't notice when renaming failed
Change the data in the model before the real renaming is done by KonqOperations::rename(),
but when the rename operation fails, revert the data changes in the model.
M +14 -1 dolphin/src/views/dolphinview.cpp
M +2 -0 dolphin/src/views/dolphinview.h
M +27 -5 lib/konq/konq_operations.cpp
M +30 -1 lib/konq/konq_operations.h