Commit cab9078e authored by Robert Hoffmann's avatar Robert Hoffmann Committed by Nate Graham
Browse files

Fix drop between shared views

Remove trailing slash from folderUrl, too, when comparing to
the file's url (minus file name minus trailing slash). FolderUrls
like file:///home/user/Desktop/ may appear and fail comparing.

Fixes regression introduced in 07001277
(see which fixes urls like
file:///home/user/foo (if using a different folder than Desktop)
but breaks moving files from one screen to another using normal
Desktop folder.

Test Plan:
1. Use folder view, Desktop folder, more than one screen.
Create files and folders in Desktop folder and move them from one
screen to another. The Copy/Move/Link menu must not appear
and files/folders must be dropped onto the other screen.

2. Use a different folder than Desktop (the same on both screens).
Moving files/folders to another screen must work like in 1.

Reviewers: mart

Reviewed By: mart

Subscribers: amantia, plasma-devel

Tags: #plasma

Differential Revision:
parent 42a74c9a
......@@ -998,7 +998,8 @@ void FolderModel::dragSelectedInternal(int x, int y)
static bool isDropBetweenSharedViews(const QList<QUrl> &urls, const QUrl &folderUrl)
for (const auto &url : urls) {
if (folderUrl != url.adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash)) {
if (folderUrl.adjusted(QUrl::StripTrailingSlash)
!= url.adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash)) {
return false;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment