1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 03:08:14 +00:00

Use versioned config directory for profiles. Fixes #1664

This commit is contained in:
grossmj 2019-10-09 15:20:19 +08:00
parent 56a4d3f8fd
commit 5a3f8b9a9b

View File

@ -70,7 +70,7 @@ class Config:
if self._profile: if self._profile:
legacy_user_dir = os.path.join(appdata, appname, "profiles", self._profile) legacy_user_dir = os.path.join(appdata, appname, "profiles", self._profile)
versioned_user_dir = legacy_user_dir versioned_user_dir = os.path.join(appdata, appname, version, "profiles", self._profile)
else: else:
legacy_user_dir = os.path.join(appdata, appname) legacy_user_dir = os.path.join(appdata, appname)
versioned_user_dir = os.path.join(appdata, appname, version) versioned_user_dir = os.path.join(appdata, appname, version)
@ -107,7 +107,7 @@ class Config:
if self._profile: if self._profile:
legacy_user_dir = os.path.join(home, ".config", appname, "profiles", self._profile) legacy_user_dir = os.path.join(home, ".config", appname, "profiles", self._profile)
versioned_user_dir = legacy_user_dir versioned_user_dir = os.path.join(home, ".config", appname, version, "profiles", self._profile)
else: else:
legacy_user_dir = os.path.join(home, ".config", appname) legacy_user_dir = os.path.join(home, ".config", appname)
versioned_user_dir = os.path.join(home, ".config", appname, version) versioned_user_dir = os.path.join(home, ".config", appname, version)