diff --git a/packer/src/sarasacw_omrf_packer/archiver.py b/packer/src/sarasacw_omrf_packer/archiver.py index 407cd12..8245811 100644 --- a/packer/src/sarasacw_omrf_packer/archiver.py +++ b/packer/src/sarasacw_omrf_packer/archiver.py @@ -48,7 +48,7 @@ class Archiver: target_filepath.parent.mkdir(parents=True, exist_ok=True) if self.__dist_zip is not None: - self.__dist_zip.mkdir(str(arcname)) + self.__dist_zip.mkdir(arcname.as_posix()) def push_file(self, filepath: Path, arcname: Path) -> None: """Mirror an existing file into both sinks. @@ -63,7 +63,7 @@ class Archiver: shutil.copy(filepath, target_filepath) if self.__dist_zip is not None: - self.__dist_zip.write(filepath, arcname) + self.__dist_zip.write(filepath, arcname.as_posix()) def push_text(self, text: str, arcname: Path) -> None: """Mirror in-memory text into both sinks. @@ -79,7 +79,7 @@ class Archiver: f.write(text) if self.__dist_zip is not None: - self.__dist_zip.writestr(str(arcname), text) + self.__dist_zip.writestr(arcname.as_posix(), text) def __enter__(self) -> "Archiver": """Enter the context and return this archiver as the bound target."""