mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Change seperator for additonnal images directory otherwise bug on windows
This commit is contained in:
5 files changed
+9
-9
No files matched your search
@@ -19,15 +19,16 @@
|
||||
import re
|
||||
import os
|
||||
import textwrap
|
||||
import pathlib
|
||||
import posixpath
|
||||
|
||||
|
||||
def force_unix_path(path):
|
||||
"""
|
||||
:param path: Path to convert
|
||||
"""
|
||||
|
||||
p = pathlib.Path(os.path.normpath(path))
|
||||
return p.as_posix()
|
||||
path = path.replace("\\", "/")
|
||||
return posixpath.normpath(path)
|
||||
|
||||
|
||||
def macaddress_to_int(mac_address):
|
||||
|
||||
@@ -71,7 +71,7 @@ def images_directories(type):
|
||||
raise NotImplementedError("%s is not supported", type)
|
||||
os.makedirs(type_img_directory, exist_ok=True)
|
||||
paths.append(type_img_directory)
|
||||
for directory in server_config.get("additional_images_path", "").split(":"):
|
||||
for directory in server_config.get("additional_images_path", "").split(";"):
|
||||
paths.append(directory)
|
||||
# Compatibility with old topologies we look in parent directory
|
||||
paths.append(img_dir)
|
||||
|
||||
Reference in new issue
Block a user