Merge pull request #6947 from huffman/fix-entity--mkdir

Update entity server to always make resource directory if it does not…
This commit is contained in:
Howard Stearns 2016-01-27 13:03:00 -08:00
commit f00ec8de5d

View file

@ -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";