1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-29 09:32:45 +00:00

Canonicalise resolved representation of data directories

This commit is contained in:
AnyOldName3 2024-03-15 00:42:15 +00:00
parent f3b01973ce
commit a06ab94a20

View File

@ -35,14 +35,20 @@ void Config::GameSettings::validatePaths()
for (const auto& dataDir : paths) for (const auto& dataDir : paths)
{ {
if (QDir(dataDir.value).exists()) if (QDir(dataDir.value).exists())
mDataDirs.append(dataDir); {
SettingValue copy = dataDir;
copy.value = QDir(dataDir.value).canonicalPath();
mDataDirs.append(copy);
}
} }
// Do the same for data-local // Do the same for data-local
const QString& local = mSettings.value(QString("data-local")).value; const QString& local = mSettings.value(QString("data-local")).value;
if (!local.isEmpty() && QDir(local).exists()) if (!local.isEmpty() && QDir(local).exists())
mDataLocal = local; {
mDataLocal = QDir(local).canonicalPath();
}
} }
QString Config::GameSettings::getResourcesVfs() const QString Config::GameSettings::getResourcesVfs() const