From caf7af7ad5cf4c4bad8c406ad604def63a6af6bc Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Wed, 1 Jul 2015 17:30:52 +0200 Subject: [PATCH] Support server config in current working directory --- gns3server/config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gns3server/config.py b/gns3server/config.py index 3efc6cba..54a156dc 100644 --- a/gns3server/config.py +++ b/gns3server/config.py @@ -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"),