mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 20:06:02 +02:00
migrate domain-server config from single org name
This commit is contained in:
parent
4cfe3941f4
commit
cddb8cd3f0
1 changed files with 12 additions and 3 deletions
|
@ -125,14 +125,23 @@ void HifiConfigVariantMap::loadMasterAndUserConfig(const QStringList& argumentLi
|
||||||
// as of 1/19/2016 this path was moved so we attempt a migration for first run post migration here
|
// as of 1/19/2016 this path was moved so we attempt a migration for first run post migration here
|
||||||
|
|
||||||
// figure out what the old path was
|
// figure out what the old path was
|
||||||
|
|
||||||
|
// if our build version is "dev" we should migrate from a different organization folder
|
||||||
|
auto oldOrganizationName = QCoreApplication::organizationName();
|
||||||
|
if (oldOrganizationName == "High Fidelity - dev") {
|
||||||
|
oldOrganizationName = "High Fidelity";
|
||||||
|
}
|
||||||
|
|
||||||
auto oldConfigFilename = QString("%1/%2/%3/%4").arg(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation),
|
auto oldConfigFilename = QString("%1/%2/%3/%4").arg(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation),
|
||||||
QCoreApplication::organizationName(),
|
oldOrganizationName,
|
||||||
QCoreApplication::applicationName(),
|
QCoreApplication::applicationName(),
|
||||||
USER_CONFIG_FILE_NAME);
|
USER_CONFIG_FILE_NAME);
|
||||||
|
|
||||||
|
|
||||||
// check if there's already a config file at the new path
|
// check if there's already a config file at the new path
|
||||||
QFile newConfigFile { _userConfigFilename };
|
QFile newConfigFile { _userConfigFilename };
|
||||||
if (!newConfigFile.exists()) {
|
if (!newConfigFile.exists()) {
|
||||||
|
|
||||||
QFile oldConfigFile { oldConfigFilename };
|
QFile oldConfigFile { oldConfigFilename };
|
||||||
|
|
||||||
if (oldConfigFile.exists()) {
|
if (oldConfigFile.exists()) {
|
||||||
|
|
Loading…
Reference in a new issue