summaryrefslogtreecommitdiff
path: root/src/downloadmanager.cpp
diff options
context:
space:
mode:
authorAl12rs <gabriel.cortesi@outlook.com>2018-08-06 20:17:57 +0200
committerAl12rs <gabriel.cortesi@outlook.com>2018-08-06 20:17:57 +0200
commitb0c15c9cfb74bba152eceb4d3f4d490cd75c754b (patch)
tree3e70a1fcb8f23bea38a5241a26f84ecf086ce73b /src/downloadmanager.cpp
parentf92027bea61593e22260d0c6296029c1acc4a306 (diff)
Added Open File option to downloads tab.
Diffstat (limited to 'src/downloadmanager.cpp')
-rw-r--r--src/downloadmanager.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index bff2cc7b..331556cb 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -935,13 +935,12 @@ void DownloadManager::openFile(int index)
}
QDir path = QDir(m_OutputDirectory);
if (path.exists(getFileName(index))) {
- params = params + QDir::toNativeSeparators(getFilePath(index)) + "\"";
- ::ShellExecuteW(nullptr, nullptr, L"open", ToWString(params).c_str(), nullptr, SW_SHOWNORMAL);
+ ::ShellExecuteW(nullptr, L"open", ToWString(QDir::toNativeSeparators(getFilePath(index))).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
return;
}
- ::ShellExecuteW(nullptr, L"open", ToWString(QDir::toNativeSeparators(m_OutputDirectory)).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
+ ::ShellExecuteW(nullptr, L"explore", ToWString(QDir::toNativeSeparators(m_OutputDirectory)).c_str(), nullptr, nullptr, SW_SHOWNORMAL);
return;
}