D24907: Fix error handling when renaming a single file

Alex Miranda noreply at phabricator.kde.org
Thu Oct 24 07:15:30 BST 2019


alexmi created this revision.
alexmi added reviewers: VDG, Dolphin.
Herald added a project: Dolphin.
Herald added a subscriber: kfm-devel.
alexmi requested review of this revision.

REVISION SUMMARY
  This removes unnecessary error handling that resulted in a couple of
  bugs: One, if a rename operation failed (e.g. the new filename is too
  long), the file's name did not get reverted. Two, when the new requested
  filename was already in use, it would correctly ask the user for a new
  one but after the operation finished successfully the file with the old
  filename would be selected instead of the new one.
  
  There's no need to manually check for a filename conflict, KIO will
  handle that for us and only proceed with the operation when it should.
  
  To be more consistent with other error messages in Dolphin, the error
  message dialog when a rename operation fails was removed and instead the
  errorMessage signal will be emitted. Currently this results in the error
  message being displayed at the top.

TEST PLAN
  - Verify renaming a single file or folder still works as expected even
  
  when the operation fails or there's a filename conflict

REPOSITORY
  R318 Dolphin

BRANCH
  bugfix-rename-error-handling

REVISION DETAIL
  https://phabricator.kde.org/D24907

AFFECTED FILES
  src/views/dolphinview.cpp

To: alexmi, #vdg, #dolphin
Cc: kfm-devel, iasensio, fprice, MrPepe, fbampaloukas, alexde, Codezela, feverfew, meven, spoorun, navarromorales, firef, ngraham, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20191024/22a55d54/attachment.htm>


More information about the kfm-devel mailing list