mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
If image is not found in VM directory look in images folder
This commit is contained in:
1 parent
3467b42ab5
commit
0dea63c9ea
2 files changed
+17
-1
No files matched your search
@@ -386,7 +386,16 @@ class BaseManager:
|
||||
img_directory = self.get_images_directory()
|
||||
if not os.path.isabs(path):
|
||||
s = os.path.split(path)
|
||||
return os.path.normpath(os.path.join(img_directory, *s))
|
||||
path = os.path.normpath(os.path.join(img_directory, *s))
|
||||
|
||||
# Compatibility with old topologies we look in parent directory
|
||||
# We look at first in new location
|
||||
if not os.path.exists(path):
|
||||
old_path = os.path.normpath(os.path.join(img_directory, '..', *s))
|
||||
if os.path.exists(old_path):
|
||||
return old_path
|
||||
|
||||
return path
|
||||
return path
|
||||
|
||||
def get_relative_image_path(self, path):
|
||||
|
||||
Reference in new issue
Block a user