┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArjun AK <[email protected]>2014-09-21 17:01:51 +0530
committerArjun AK <[email protected]>2014-09-21 17:16:19 +0530
commit398162a1be83d7f3c3645b44a10a165f769e5f59 (patch)
tree7a772e299e127e2bff6c0adb821ac859ecd76208 /src
parent47bd2048048f71163e5e15785132abeeaf7ea69e (diff)
Do not allow files or folders inside trash to be added to dolphin's places panel
REVIEW: 120286 BUG: 339204 FIXED-IN: 4.14.2
Diffstat (limited to 'src')
-rw-r--r--src/panels/places/placesitemmodel.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp
index 1f05e07f9..2ac216958 100644
--- a/src/panels/places/placesitemmodel.cpp
+++ b/src/panels/places/placesitemmodel.cpp
@@ -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;
}