From fc4e9d011ca39542d4f633a392f6d59a9eca2b92 Mon Sep 17 00:00:00 2001 From: Riccardo Mori Date: Thu, 25 Apr 2024 15:18:29 +0200 Subject: [PATCH] Use string path with libmagic instead of Path --- src/binexport/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/binexport/__main__.py b/src/binexport/__main__.py index 32e294a..a250c3a 100755 --- a/src/binexport/__main__.py +++ b/src/binexport/__main__.py @@ -39,7 +39,7 @@ class Bcolors: def recursive_file_iter(p: Path) -> Generator[Path, None, None]: if p.is_file(): - mime_type = magic.from_file(p, mime=True) + mime_type = magic.from_file(str(p), mime=True) if mime_type not in BINARY_FORMAT and p.suffix not in EXTENSIONS_WHITELIST.get( mime_type, [] ):