Install appliances and configs without importlib_resources for Windows only

This commit is contained in:
grossmj 2022-11-08 23:07:45 +08:00
parent 284a4b62fb
commit c80a55b18c
2 changed files with 2 additions and 2 deletions

View File

@ -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)):

View File

@ -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)):