Skip to content

Commit

Permalink
fix(windows): use posix path to make test work on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Dec 16, 2024
1 parent c0f54a8 commit acdcede
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions antarest/study/storage/rawstudy/model/filesystem/inode.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,16 @@ def get_file_content(self) -> Tuple[bytes, str, str]:
return (
read_original_file_in_archive(
self.config.archive_path,
str(self.get_relative_path_inside_archive(self.config.archive_path)),
self.get_relative_path_inside_archive(self.config.archive_path),
),
suffix,
filename,
)
else:
return self.config.path.read_bytes(), suffix, filename

def get_relative_path_inside_archive(self, archive_path: Path) -> Path:
return self.config.path.relative_to(archive_path.parent / self.config.study_id)
def get_relative_path_inside_archive(self, archive_path: Path) -> str:
return self.config.path.relative_to(archive_path.parent / self.config.study_id).as_posix()

def _assert_url_end(self, url: Optional[List[str]] = None) -> None:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def get_file_content(self) -> t.Tuple[bytes, str, str]:
if self.config.archive_path:
return (
read_original_file_in_archive(
self.config.archive_path, str(self.get_relative_path_inside_archive(self.config.archive_path))
self.config.archive_path, self.get_relative_path_inside_archive(self.config.archive_path)
),
suffix,
filename,
Expand Down

0 comments on commit acdcede

Please sign in to comment.