diff --git a/acacore/__version__.py b/acacore/__version__.py index 5becc17..5c4105c 100644 --- a/acacore/__version__.py +++ b/acacore/__version__.py @@ -1 +1 @@ -__version__ = "1.0.0" +__version__ = "1.0.1" diff --git a/acacore/models/file.py b/acacore/models/file.py index ff3152d..352f09a 100644 --- a/acacore/models/file.py +++ b/acacore/models/file.py @@ -125,7 +125,7 @@ def from_file( file.action = file.action_data.reidentify.onfail else: file.action = "manual" - file.action_data = ActionData(manual=ManualAction(reason="Re-identify failure")) + file.action_data = ActionData(manual=ManualAction(reasoning="Re-identify failure", process="")) file.puid = file.signature = file.warning = None if file.action_data and file.action_data.ignore and file.action_data.ignore.ignore_if: diff --git a/acacore/utils/functions.py b/acacore/utils/functions.py index f8668e9..51db7f2 100644 --- a/acacore/utils/functions.py +++ b/acacore/utils/functions.py @@ -128,7 +128,8 @@ def get_eof(path: Path, chunk_size: int = 1024) -> bytes: bytes: The contents of the last chunk of the file as a bytes object. """ with path.open("rb") as f: - f.seek(path.stat().st_size - chunk_size) + file_size: int = path.stat().st_size + f.seek(file_size if chunk_size > file_size else chunk_size) return f.read(chunk_size) diff --git a/pyproject.toml b/pyproject.toml index ea3258e..00e7d42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "acacore" -version = "1.0.0" +version = "1.0.1" description = "" authors = ["Matteo Campinoti "] license = "GPL-3.0"