aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/Mod.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/minecraft/mod/Mod.cpp')
-rw-r--r--launcher/minecraft/mod/Mod.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/launcher/minecraft/mod/Mod.cpp b/launcher/minecraft/mod/Mod.cpp
index 81bb902f..bba7b342 100644
--- a/launcher/minecraft/mod/Mod.cpp
+++ b/launcher/minecraft/mod/Mod.cpp
@@ -164,12 +164,8 @@ void Mod::setMetadata(Metadata::ModStruct* metadata)
auto Mod::destroy(QDir& index_dir, bool preserve_metadata) -> bool
{
- auto n = name();
- // FIXME: This can fail to remove the metadata if the
- // "ModMetadataDisabled" setting is on, since there could
- // be a name mismatch!
- if(!preserve_metadata)
- Metadata::remove(index_dir, n);
+ if (!preserve_metadata && status() != ModStatus::NoMetadata)
+ Metadata::remove(index_dir, metadata()->mod_id());
m_type = MOD_UNKNOWN;
return FS::deletePath(m_file.filePath());