mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 06:41:13 +02:00
Support server config in current working directory
This commit is contained in:
1 parent
472faa97c5
commit
caf7af7ad5
1 file changed
+4
-2
@@ -62,7 +62,8 @@ class Config(object):
|
||||
common_appdata = os.path.expandvars("%COMMON_APPDATA%")
|
||||
filename = "gns3_server.ini"
|
||||
if self._files is None:
|
||||
self._files = [os.path.join(appdata, appname, filename),
|
||||
self._files = [os.path.join(os.getcwd(), filename),
|
||||
os.path.join(appdata, appname, filename),
|
||||
os.path.join(appdata, appname + ".ini"),
|
||||
os.path.join(common_appdata, appname, filename),
|
||||
os.path.join(common_appdata, appname + ".ini"),
|
||||
@@ -80,7 +81,8 @@ class Config(object):
|
||||
home = os.path.expanduser("~")
|
||||
filename = "gns3_server.conf"
|
||||
if self._files is None:
|
||||
self._files = [os.path.join(home, ".config", appname, filename),
|
||||
self._files = [os.path.join(os.getcwd(), filename),
|
||||
os.path.join(home, ".config", appname, filename),
|
||||
os.path.join(home, ".config", appname + ".conf"),
|
||||
os.path.join("/etc/xdg", appname, filename),
|
||||
os.path.join("/etc/xdg", appname + ".conf"),
|
||||
|
||||
Reference in new issue
Block a user