SCRATCH remove more obsolete asset logic

This commit is contained in:
Petr Mrázek 2015-02-11 01:17:31 +01:00
parent c8687a8d05
commit 47bbc349eb
2 changed files with 0 additions and 33 deletions

View File

@ -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

View File

@ -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);
}