diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-26 21:33:15 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-26 21:33:15 +0300 |
commit | c778dcbc9c326c1bf563852d7393bf43c1514346 (patch) | |
tree | b0b556492b5c83d07858f60d56feadca64983648 /launcher/minecraft/mod/Resource.cpp | |
parent | d7f4e40f85d1e253fe62e1c9e1cfb1842ffb0c86 (diff) | |
parent | a0944dab7a8fff9b5d9c2c8d35cc55349c93a3cd (diff) | |
download | PrismLauncher-c778dcbc9c326c1bf563852d7393bf43c1514346.tar.gz PrismLauncher-c778dcbc9c326c1bf563852d7393bf43c1514346.tar.bz2 PrismLauncher-c778dcbc9c326c1bf563852d7393bf43c1514346.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into curse
Diffstat (limited to 'launcher/minecraft/mod/Resource.cpp')
-rw-r--r-- | launcher/minecraft/mod/Resource.cpp | 8 |
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 |