Fix asset server not creating resources directory before migrating

This commit is contained in:
Ryan Huffman 2016-01-21 17:40:12 -08:00
parent 99bb1fcbe1
commit f9718931b0

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();