While pasting an image from clipboard and giving a name to the file that is going to be created the same as one of the existing files, the existing file is replaced without confirmation.
Git commit b73355da3f5b963b67c1888a21384074c0e93e22 by Elvis Angelaccio. Committed on 01/06/2018 at 21:35. Pushed by elvisangelaccio into branch 'master'. Check if destination exists also when pasting binary data Summary: Currently we check whether the destination URL exists only if we are pasting text (or if the mimedata has only one format). If we are pasting e.g. images copied from Spectacle, we unconditionally overwrite the destination URL. This patch moves the StatJob+RenameDialog from `getNewFileName()` to a new `getDestinationUrl()` function, which we can also call from `chooseFormatAndUrl()`. FIXED-IN: 5.47 Test Plan: - Paste some image into an existing file and check the rename dialog. - Check that pasting text still shows the rename dialog. Reviewers: dfaure Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D13145 M +30 -22 src/widgets/paste.cpp https://commits.kde.org/kio/b73355da3f5b963b67c1888a21384074c0e93e22