From a731a571e02809882abe638680d5813c4475b6dc Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Tue, 26 Jan 2016 13:50:58 -0800 Subject: [PATCH] Update entity server to always make resource directory if it does not exist --- assignment-client/src/octree/OctreeServer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assignment-client/src/octree/OctreeServer.cpp b/assignment-client/src/octree/OctreeServer.cpp index d63e8e6620..81e25cc7ba 100644 --- a/assignment-client/src/octree/OctreeServer.cpp +++ b/assignment-client/src/octree/OctreeServer.cpp @@ -1172,15 +1172,15 @@ void OctreeServer::domainSettingsRequestComplete() { pathToCopyFrom = oldDefaultPersistPath; } + QDir persistFileDirectory = QDir(persistPath).filePath(".."); + if (!persistFileDirectory.exists()) { + qDebug() << "Creating data directory " << persistFileDirectory.absolutePath(); + persistFileDirectory.mkpath("."); + } + if (shouldCopy) { qDebug() << "Old persist file found, copying from " << pathToCopyFrom << " to " << persistPath; - QDir persistFileDirectory = QDir(persistPath).filePath(".."); - - if (!persistFileDirectory.exists()) { - qDebug() << "Creating data directory " << persistFileDirectory.path(); - persistFileDirectory.mkpath("."); - } QFile::copy(pathToCopyFrom, persistPath); } else { qDebug() << "No existing persist file found";