kio-extras5/0003-don-t-screw-up-the-filenames.patch

31 lines
1.3 KiB
Diff
Raw Normal View History

From 92bbcc70d6aa753757c38bb8747f48e9218bacfc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= <lukas@kde.org>
Date: Wed, 8 Oct 2014 21:50:27 +0200
Subject: [PATCH 3/5] don't screw up the filenames
save in hex format, just like KIO::filePreview does and what's
mandated by the thumbnail spec:
http://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-latest.html#THUMBSAVE
(cherry picked from commit 9ddd3441cfca384d73a57ca560bddb19410e460a)
---
thumbnail/thumbnail.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/thumbnail/thumbnail.cpp b/thumbnail/thumbnail.cpp
index d4a7f35014af21fb1dacaea59128ac7373e6805b..39e8de58d6312cc2ee4eab141470bd88bede809e 100644
--- a/thumbnail/thumbnail.cpp
+++ b/thumbnail/thumbnail.cpp
@@ -711,7 +711,7 @@ bool ThumbnailProtocol::createSubThumbnail(QImage& thumbnail, const QString& fil
int cacheSize = 0;
QCryptographicHash md5(QCryptographicHash::Md5);
md5.addData(QFile::encodeName(fileName.url()));
- const QString thumbName = QFile::encodeName(md5.result()) + ".png";
+ const QString thumbName = QFile::encodeName(md5.result().toHex()) + ".png";
if (m_thumbBasePath.isEmpty()) {
m_thumbBasePath = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + QLatin1String("/thumbnails/");
--
2.1.2