Commit dedf0ee3 authored by Eduardo Sánchez Muñoz's avatar Eduardo Sánchez Muñoz Committed by Méven Car
Browse files

Do not create thumbnails when it requires to copy the file to /tmp

BUG: 368104
parent 0c2fc4f4
Pipeline #102328 passed with stage
in 5 minutes and 17 seconds
......@@ -738,23 +738,11 @@ 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;
QTemporaryFile localFile;
localFile.setAutoRemove(false);
localFile.open();
tempName = localFile.fileName();
const QUrl currentURL = item.mostLocalUrl();
KIO::Job *job = KIO::file_copy(currentURL, QUrl::fromLocalFile(tempName), -1, KIO::Overwrite | KIO::HideProgressInfo /* No GUI */);
job->addMetaData(QStringLiteral("thumbnail"), QStringLiteral("1"));
q->addSubjob(job);
// No plugin support access to this remote content, don't
// create the thumbnail (bugs 208625, 368104)
cleanupTempFile();
determineNextFile();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment