]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinview.cpp
allow to browse through ZIP files (thanks to Filip Brcic for the patch!)
[dolphin.git] / src / dolphinview.cpp
index 47c98f03fa95e5517ee4e4b54d18fb5fb776703f..6898d059ab1f6f4d3ae5def331f4ab15d0918988 100644 (file)
@@ -652,6 +652,19 @@ void DolphinView::triggerItem(const QModelIndex& index)
             setUrl(KUrl(localPath));
         }
     }
+    else if (item->isFile() && item->mimeTypePtr()->is("application/x-zip")) {
+        // allow to browse through ZIP files
+        const QString localPath(item->localPath());
+        KUrl url;
+        if (localPath.isEmpty()) {
+            url = item->url();
+        }
+        else {
+            url = localPath;
+        }
+        url.setProtocol("zip");
+        setUrl(url);
+    }
     else {
         item->run();
     }