summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/downloadmanager.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index ce60c8e1..9e1b682b 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -1097,21 +1097,25 @@ void DownloadManager::openMetaFile(int index) {
return;
}
- auto path = QDir(m_OutputDirectory);
- auto metaPath = getFilePath(index) + ".meta";
+ const auto path = QDir(m_OutputDirectory);
+ const auto filePath = getFilePath(index);
+ const auto metaPath = filePath + ".meta";
+
if (path.exists(metaPath)) {
shell::Open(metaPath);
return;
}
-
- auto info = m_ActiveDownloads[index];
- info->m_FileInfo->repository = "Nexus";
+ else {
+ QSettings metaFile(metaPath, QSettings::IniFormat);
+ metaFile.setValue("removed", false);
+ }
if (path.exists(metaPath)) {
shell::Open(metaPath);
- } else {
- shell::Explore(m_OutputDirectory);
+ return;
}
+
+ shell::Explore(filePath);
}
void DownloadManager::openInDownloadsFolder(int index)