1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-14 19:12:11 +01:00

Windows, Download Manager: Fix Open Folder action when file is downloading.

Fixes #2590
This commit is contained in:
Razi Alavizadeh 2018-02-09 02:35:12 +03:30 committed by David Rosca
parent d9638d41be
commit 4705581689
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -322,6 +322,11 @@ void DownloadItem::openFolder()
{ {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
QString winFileName = QSL("%1/%2").arg(m_path, m_fileName); QString winFileName = QSL("%1/%2").arg(m_path, m_fileName);
if (m_downloading) {
winFileName.append(QSL(".download"));
}
winFileName.replace(QLatin1Char('/'), "\\"); winFileName.replace(QLatin1Char('/'), "\\");
QString shExArg = "/e,/select,\"" + winFileName + "\""; QString shExArg = "/e,/select,\"" + winFileName + "\"";
ShellExecute(NULL, NULL, TEXT("explorer.exe"), shExArg.toStdWString().c_str(), NULL, SW_SHOW); ShellExecute(NULL, NULL, TEXT("explorer.exe"), shExArg.toStdWString().c_str(), NULL, SW_SHOW);