aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/Resource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/minecraft/mod/Resource.cpp')
-rw-r--r--launcher/minecraft/mod/Resource.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/launcher/minecraft/mod/Resource.cpp b/launcher/minecraft/mod/Resource.cpp
index e5077260..098a617f 100644
--- a/launcher/minecraft/mod/Resource.cpp
+++ b/launcher/minecraft/mod/Resource.cpp
@@ -148,14 +148,10 @@ bool Resource::enable(EnableAction action)
return true;
}
-bool Resource::destroy()
+bool Resource::destroy(bool attemptTrash)
{
m_type = ResourceType::UNKNOWN;
-
- if (FS::trash(m_file_info.filePath()))
- return true;
-
- return FS::deletePath(m_file_info.filePath());
+ return (attemptTrash && FS::trash(m_file_info.filePath())) || FS::deletePath(m_file_info.filePath());
}
bool Resource::isSymLinkUnder(const QString& instPath) const