Skip to content

Commit

Permalink
Merge pull request #716
Browse files Browse the repository at this point in the history
v3.2.16
  • Loading branch information
MatteoCampinoti94 authored Aug 29, 2024
2 parents 5689c77 + 5ee0a39 commit 86daefc
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion digiarch/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.2.15"
__version__ = "3.2.16"
4 changes: 2 additions & 2 deletions digiarch/extract/extractors/extractor_msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def extract(self) -> Generator[Path, None, None]:

for attachment in inline_attachments + attachments:
if isinstance(attachment, (Message, MessageSigned)):
path: Path = extract_folder.joinpath(sanitize_path(attachment.filename))
path: Path = extract_folder.joinpath(sanitize_path(attachment.filename.replace("/", "_")))
if path.suffix != ".msg":
path = path.with_name(path.name + ".msg")
attachment.export(path)
Expand All @@ -128,7 +128,7 @@ def extract(self) -> Generator[Path, None, None]:
raise ExtractError(self.file, f"Cannot extract attachment with data of type {type(attachment.data)}")
else:
name = attachment.longFilename if isinstance(attachment, SignedAttachment) else attachment.getFilename()
path: Path = extract_folder.joinpath(sanitize_path(name))
path: Path = extract_folder.joinpath(sanitize_path(name.replace("/", "_")))
with path.open("wb") as fh:
# noinspection PyTypeChecker
fh.write(attachment.data or b"")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "digiarch"
version = "3.2.15"
version = "3.2.16"
description = "Tools for the Digital Archive Project at Aarhus Stadsarkiv"
authors = ["Aarhus Stadsarkiv <[email protected]>"]
license = "GPL-3.0"
Expand Down
Binary file modified tests/files/_metadata/files.db
Binary file not shown.
Binary file added tests/files/message4.eml
Binary file not shown.

0 comments on commit 86daefc

Please sign in to comment.