From a06ab94a209e1123ec8c37eedc51c021f1ee4756 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Fri, 15 Mar 2024 00:42:15 +0000 Subject: [PATCH] Canonicalise resolved representation of data directories --- components/config/gamesettings.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/components/config/gamesettings.cpp b/components/config/gamesettings.cpp index 976d5e20f2..21110562d5 100644 --- a/components/config/gamesettings.cpp +++ b/components/config/gamesettings.cpp @@ -35,14 +35,20 @@ void Config::GameSettings::validatePaths() for (const auto& dataDir : paths) { 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 const QString& local = mSettings.value(QString("data-local")).value; if (!local.isEmpty() && QDir(local).exists()) - mDataLocal = local; + { + mDataLocal = QDir(local).canonicalPath(); + } } QString Config::GameSettings::getResourcesVfs() const