1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02:00

DownloadManager: Don't try to percent decode filenames

QtWebEngine no longer percent encode it, so actually trying
to decode it produces invalid results.

BUG: 395424
FIXED-IN: 3.0.2
This commit is contained in:
David Rosca 2018-07-08 20:43:44 +02:00
parent 53e0a43762
commit 95e2232d39
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -268,10 +268,7 @@ void DownloadManager::download(QWebEngineDownloadItem *downloadItem)
QString downloadPath;
bool openFile = false;
QString fileName = QFileInfo(downloadItem->path()).fileName();
fileName = QUrl::fromPercentEncoding(fileName.toUtf8());
// Filename may have been percent encoded and actually containing path
fileName = QFileInfo(fileName).fileName();
const QString fileName = QFileInfo(downloadItem->path()).fileName();
const bool forceAsk = downloadItem->savePageFormat() != QWebEngineDownloadItem::UnknownSaveFormat
|| downloadItem->type() == QWebEngineDownloadItem::UserRequested;