mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Fix an issue in IOU relative path looking
This commit is contained in:
1 parent
f31071d510
commit
ddb8a9f06e
2 files changed
+8
-6
No files matched your search
@@ -139,9 +139,10 @@ class IOUVM(BaseVM):
|
||||
|
||||
if not os.path.isabs(path):
|
||||
server_config = self.manager.config.get_section_config("Server")
|
||||
path = os.path.join(os.path.expanduser(server_config.get("images_path", "~/GNS3/images")), path)
|
||||
if not os.path.exists(path):
|
||||
path = os.path.join(os.path.expanduser(server_config.get("images_path", "~/GNS3/images")), "IOU", path)
|
||||
relative_path = os.path.join(os.path.expanduser(server_config.get("images_path", "~/GNS3/images")), path)
|
||||
if not os.path.exists(relative_path):
|
||||
relative_path = os.path.join(os.path.expanduser(server_config.get("images_path", "~/GNS3/images")), "IOU", path)
|
||||
path = relative_path
|
||||
|
||||
self._path = path
|
||||
if not os.path.isfile(self._path) or not os.path.exists(self._path):
|
||||
|
||||
Reference in new issue
Block a user