Update configuration path to be backwards compatible (#4620)

* Update configuration path to be backwards compatible
Windows users have used AppData/Local/Cockatrice, whereas the new system was using AppData/Roaming/Cockatrice. This reverts the behavior in a Qt5/6 way.
This commit is contained in:
Zach H 2022-05-12 18:13:49 -04:00 committed by GitHub
parent a8e1dc3b18
commit 6b86e4d463
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -18,7 +18,7 @@ QString SettingsCache::getDataPath()
if (isPortableBuild)
return qApp->applicationDirPath() + "/data";
else
return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
return QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation);
}
QString SettingsCache::getSettingsPath()

View file

@ -45,6 +45,6 @@ QString SettingsCache::guessConfigurationPath()
return guessFileName;
#endif
guessFileName = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/" + fileName;
guessFileName = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + "/" + fileName;
return guessFileName;
}