diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-02-11 01:17:31 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-04-12 20:57:18 +0200 |
commit | 47bbc349eb897ac20e4043e9acfa738633a43ebc (patch) | |
tree | dafd441ff142e87a40a333c5e503f3a3c7554bff /logic | |
parent | c8687a8d05cc62c062ac18f8a583ceee9ba6d7d9 (diff) | |
download | MultiMC-47bbc349eb897ac20e4043e9acfa738633a43ebc.tar MultiMC-47bbc349eb897ac20e4043e9acfa738633a43ebc.tar.gz MultiMC-47bbc349eb897ac20e4043e9acfa738633a43ebc.tar.lz MultiMC-47bbc349eb897ac20e4043e9acfa738633a43ebc.tar.xz MultiMC-47bbc349eb897ac20e4043e9acfa738633a43ebc.zip |
SCRATCH remove more obsolete asset logic
Diffstat (limited to 'logic')
-rw-r--r-- | logic/minecraft/AssetsUtils.cpp | 32 | ||||
-rw-r--r-- | logic/minecraft/AssetsUtils.h | 1 |
2 files changed, 0 insertions, 33 deletions
diff --git a/logic/minecraft/AssetsUtils.cpp b/logic/minecraft/AssetsUtils.cpp index 9f33b1bd..63179228 100644 --- a/logic/minecraft/AssetsUtils.cpp +++ b/logic/minecraft/AssetsUtils.cpp @@ -27,38 +27,6 @@ namespace AssetsUtils { -int findLegacyAssets() -{ - QDir assets_dir("assets"); - if (!assets_dir.exists()) - return 0; - assets_dir.setFilter(QDir::AllEntries | QDir::NoDotAndDotDot); - int base_length = assets_dir.path().length(); - - QList<QString> blacklist = {"indexes", "objects", "virtual"}; - - QDirIterator iterator(assets_dir, QDirIterator::Subdirectories); - int found = 0; - while (iterator.hasNext()) - { - QString currentDir = iterator.next(); - currentDir = currentDir.remove(0, base_length + 1); - - bool ignore = false; - for (QString blacklisted : blacklist) - { - if (currentDir.startsWith(blacklisted)) - ignore = true; - } - - if (!iterator.fileInfo().isDir() && !ignore) - { - found++; - } - } - - return found; -} /* * Returns true on success, with index populated diff --git a/logic/minecraft/AssetsUtils.h b/logic/minecraft/AssetsUtils.h index ea12136d..2aecd4c5 100644 --- a/logic/minecraft/AssetsUtils.h +++ b/logic/minecraft/AssetsUtils.h @@ -33,7 +33,6 @@ struct AssetsIndex namespace AssetsUtils { bool loadAssetsIndexJson(QString file, AssetsIndex* index); -int findLegacyAssets(); /// Reconstruct a virtual assets folder for the given assets ID and return the folder QDir reconstructAssets(QString assetsId); } |