]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Do not allow files or folders inside trash to be added to dolphin's places panel
authorArjun AK <arjunak234@gmail.com>
Sun, 21 Sep 2014 11:31:51 +0000 (17:01 +0530)
committerArjun AK <arjunak234@gmail.com>
Sun, 21 Sep 2014 11:46:19 +0000 (17:16 +0530)
REVIEW: 120286
BUG: 339204
FIXED-IN: 4.14.2

src/panels/places/placesitemmodel.cpp

index 1f05e07f95a3e1dfdb80b7716acdfc41bbb1fdd4..2ac2169586a7eaf757bf1c3673a4c113460c60a2 100644 (file)
@@ -432,8 +432,9 @@ void PlacesItemModel::dropMimeDataBefore(int index, const QMimeData* mimeData)
                 text = url.host();
             }
 
-            if (url.isLocalFile() && !QFileInfo(url.toLocalFile()).isDir()) {
-                // Only directories are allowed
+            if ((url.isLocalFile() && !QFileInfo(url.toLocalFile()).isDir())
+                    || url.protocol() == "trash") {
+                // Only directories outside the trash are allowed
                 continue;
             }