summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'kde-frameworks/kio/files/kio-5.34.0-previewjob2.patch')
-rw-r--r--kde-frameworks/kio/files/kio-5.34.0-previewjob2.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/kde-frameworks/kio/files/kio-5.34.0-previewjob2.patch b/kde-frameworks/kio/files/kio-5.34.0-previewjob2.patch
new file mode 100644
index 000000000000..fab4d8825f4d
--- /dev/null
+++ b/kde-frameworks/kio/files/kio-5.34.0-previewjob2.patch
@@ -0,0 +1,35 @@
+From 1620032772465be475ae0746aff63a566ef2a546 Mon Sep 17 00:00:00 2001
+From: David Faure <faure@kde.org>
+Date: Sun, 14 May 2017 15:48:33 +0200
+Subject: [PATCH 2/2] PreviewJob: skip remote directories. Too expensive to
+ preview.
+
+For some protocols, file_copy() would end up copying the whole
+directory locally!
+
+FIXED-IN: 5.35
+BUG: 208625
+---
+ src/widgets/previewjob.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/widgets/previewjob.cpp b/src/widgets/previewjob.cpp
+index e836f7da..da50b219 100644
+--- a/src/widgets/previewjob.cpp
++++ b/src/widgets/previewjob.cpp
+@@ -599,6 +599,12 @@ void PreviewJobPrivate::getOrCreateThumbnail()
+ createThumbnail(fileUrl.toString());
+ return;
+ }
++ if (item.isDir()) {
++ // Skip remote dirs (bug 208625)
++ cleanupTempFile();
++ determineNextFile();
++ return;
++ }
+ // No plugin support access to this remote content, copy the file
+ // to the local machine, then create the thumbnail
+ state = PreviewJobPrivate::STATE_GETORIG;
+--
+2.13.0
+