mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-23 23:38:21 +00:00
Install appliances and configs without importlib_resources for Windows only
This commit is contained in:
parent
284a4b62fb
commit
c80a55b18c
@ -278,7 +278,7 @@ class Controller:
|
||||
|
||||
dst_path = self.configs_path()
|
||||
try:
|
||||
if hasattr(sys, "frozen"):
|
||||
if hasattr(sys, "frozen") and sys.platform.startswith("win"):
|
||||
resource_path = os.path.normpath(os.path.join(os.path.dirname(sys.executable), "configs"))
|
||||
for filename in os.listdir(resource_path):
|
||||
if not os.path.exists(os.path.join(dst_path, filename)):
|
||||
|
@ -93,7 +93,7 @@ class ApplianceManager:
|
||||
|
||||
dst_path = self._builtin_appliances_path()
|
||||
try:
|
||||
if hasattr(sys, "frozen"):
|
||||
if hasattr(sys, "frozen") and sys.platform.startswith("win"):
|
||||
resource_path = os.path.normpath(os.path.join(os.path.dirname(sys.executable), "appliances"))
|
||||
for filename in os.listdir(resource_path):
|
||||
if not os.path.exists(os.path.join(dst_path, filename)):
|
||||
|
Loading…
Reference in New Issue
Block a user