diff --git a/circup/__init__.py b/circup/__init__.py index 8d568eb..6d690e1 100644 --- a/circup/__init__.py +++ b/circup/__init__.py @@ -276,9 +276,9 @@ class Module: print(url.scheme) print(f"url.path: {url.path}") - if url.path.endswith("/"): + if url.path.endswith("/") if isinstance(backend, WebBackend) else self.path.endswith(os.sep): self.file = None - self.name = url.path.split("/")[-2] + self.name = self.path.split("/" if isinstance(backend, WebBackend) else os.sep)[-2] else: self.file = os.path.basename(url.path) self.name = ( diff --git a/circup/backends.py b/circup/backends.py index b85ce53..8bfffef 100644 --- a/circup/backends.py +++ b/circup/backends.py @@ -612,7 +612,7 @@ class DiskBackend(Backend): super().__init__(logger) self.LIB_DIR_PATH = "lib" self.device_location = device_location - self.library_path = self.device_location + "/" + self.LIB_DIR_PATH + self.library_path = os.path.join(self.device_location, os.sep + self.LIB_DIR_PATH) self.version_info = None if boot_out is not None: self.version_info = self.parse_boot_out_file(boot_out)