diff --git a/propka/input.py b/propka/input.py index 6925d4c..6a67052 100644 --- a/propka/input.py +++ b/propka/input.py @@ -38,9 +38,11 @@ def open_file_for_reading(input_file: _TextIOSource) -> ContextManager[IO[str]]: if not input_file.is_file(): for p in input_file.parents: if not zipfile.is_zipfile(p): + print(f"Parent {p} is not ZIP file.") continue zf = zipfile.ZipFile(p) - stream = zf.open(str(input_file.relative_to(p))) + path_string = Path.as_posix(input_file.relative_to(p)) + stream = zf.open(path_string) return io.TextIOWrapper(stream) return contextlib.closing(open(input_file, 'rt'))