From 3bd394b637f609404d2f751d5d93df28dec7dc8e Mon Sep 17 00:00:00 2001 From: JCDraaijer Date: Sun, 10 Nov 2019 20:41:39 +0100 Subject: [PATCH 1/2] Added workaround for #1690. Added venv/ to .gitignore --- .gitignore | 1 + gns3server/config.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index ed797b2e..74b96a15 100644 --- a/.gitignore +++ b/.gitignore @@ -58,4 +58,5 @@ startup.vpcs # Virtualenv env +venv .ropeproject diff --git a/gns3server/config.py b/gns3server/config.py index 7e8c3159..dc2fb80c 100644 --- a/gns3server/config.py +++ b/gns3server/config.py @@ -45,6 +45,9 @@ class Config: self._files = files self._profile = profile if files and len(files): + directory_name = os.path.dirname(files[0]) + if not directory_name or directory_name == "": + files[0] = './' + files[0] self._main_config_file = files[0] else: self._main_config_file = None From 7117b1fb653953b4dfdd57d793400cf081b5d641 Mon Sep 17 00:00:00 2001 From: JCDraaijer Date: Mon, 11 Nov 2019 11:20:51 +0100 Subject: [PATCH 2/2] Improved how the path to the config file is actually determined --- gns3server/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/config.py b/gns3server/config.py index dc2fb80c..d0e592ea 100644 --- a/gns3server/config.py +++ b/gns3server/config.py @@ -47,7 +47,7 @@ class Config: if files and len(files): directory_name = os.path.dirname(files[0]) if not directory_name or directory_name == "": - files[0] = './' + files[0] + files[0] = os.path.dirname(os.path.abspath(files[0])) + os.path.sep + files[0] self._main_config_file = files[0] else: self._main_config_file = None