]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/viewproperties.cpp
Merge branch 'release/20.04'
[dolphin.git] / src / views / viewproperties.cpp
index eddc7225d09e86459b52c95de232789983fecea0..e5f3a82c47172f548263655c384b43ec6689aa89 100644 (file)
@@ -26,6 +26,8 @@
 
 #include <QCryptographicHash>
 
+#include <KFileItem>
+
 namespace {
     const int AdditionalInfoViewPropertiesVersion = 1;
     const int NameRolePropertiesVersion = 2;
@@ -57,7 +59,7 @@ ViewProperties::ViewProperties(const QUrl& url) :
     // we store the properties information in a local file.
     if (useGlobalViewProps) {
         m_filePath = destinationDir(QStringLiteral("global"));
-    } else if (url.scheme().contains(QStringLiteral("search"))) {
+    } else if (url.scheme().contains(QLatin1String("search"))) {
         m_filePath = destinationDir(QStringLiteral("search/")) + directoryHashForUrl(url);
         useDetailsViewWithPath = true;
     } else if (url.scheme() == QLatin1String("trash")) {
@@ -70,6 +72,11 @@ ViewProperties::ViewProperties(const QUrl& url) :
         m_filePath = url.toLocalFile();
 
         bool useDestinationDir = !isPartOfHome(m_filePath);
+        if (!useDestinationDir) {
+            const KFileItem fileItem(url);
+            useDestinationDir = fileItem.isSlow();
+        }
+
         if (!useDestinationDir) {
             const QFileInfo dirInfo(m_filePath);
             const QFileInfo fileInfo(m_filePath + QDir::separator() + ViewPropertiesFileName);