mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 18:55:01 +02:00
fix check for existing persist file directory
This commit is contained in:
parent
cfff765731
commit
4d91b8b7d6
1 changed files with 2 additions and 2 deletions
|
@ -1179,14 +1179,14 @@ void OctreeServer::domainSettingsRequestComplete() {
|
|||
pathToCopyFrom = oldDefaultPersistPath;
|
||||
}
|
||||
|
||||
QDir persistFileDirectory = QDir(persistPath).filePath("..");
|
||||
QDir persistFileDirectory { QDir { absoluteFilePath }.dirName() };
|
||||
if (!persistFileDirectory.exists()) {
|
||||
qDebug() << "Creating data directory " << persistFileDirectory.absolutePath();
|
||||
persistFileDirectory.mkpath(".");
|
||||
}
|
||||
|
||||
if (shouldCopy) {
|
||||
qDebug() << "Old persist file found, copying from " << pathToCopyFrom << " to " << persistPath;
|
||||
qDebug() << "Old persist file found, copying from " << pathToCopyFrom << " to " << absoluteFilePath;
|
||||
|
||||
QFile::copy(pathToCopyFrom, absoluteFilePath);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue