diff --git a/assignment-client/src/assets/AssetServer.cpp b/assignment-client/src/assets/AssetServer.cpp index dab3965a6d..8ab53d3b87 100644 --- a/assignment-client/src/assets/AssetServer.cpp +++ b/assignment-client/src/assets/AssetServer.cpp @@ -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();