Merge pull request #6897 from huffman/fix-asset-migration

Fix asset server not creating resources directory before migrating
This commit is contained in:
Stephen Birarda 2016-01-21 18:25:48 -08:00
commit cc96d90a21

View file

@ -54,6 +54,9 @@ void AssetServer::run() {
_resourcesDirectory = QDir(ServerPathUtils::getDataDirectory()).filePath(RESOURCES_PATH);
qDebug() << "Creating resources directory";
_resourcesDirectory.mkpath(".");
bool noExistingAssets = !_resourcesDirectory.exists() \
|| _resourcesDirectory.entryList(QDir::Files).size() == 0;
@ -83,9 +86,6 @@ void AssetServer::run() {
}
}
qDebug() << "Creating resources directory";
_resourcesDirectory.mkpath(".");
}
qDebug() << "Serving files from: " << _resourcesDirectory.path();