From f9718931b0084b8d1fbbb5595d10f8da7a6abd29 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Thu, 21 Jan 2016 17:40:12 -0800 Subject: [PATCH] Fix asset server not creating resources directory before migrating --- assignment-client/src/assets/AssetServer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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();