From e69775471f78cb5627cea4dd08d8c73631f8a536 Mon Sep 17 00:00:00 2001 From: Darryl Nixon Date: Sun, 16 Jul 2023 11:28:03 -0700 Subject: [PATCH] pathlib Path uses bytes(), not decode() --- melamine/filesystems/ext23.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/melamine/filesystems/ext23.py b/melamine/filesystems/ext23.py index 010778b..8ee3d9f 100644 --- a/melamine/filesystems/ext23.py +++ b/melamine/filesystems/ext23.py @@ -59,7 +59,7 @@ class EXT23Handler: inode = path.stat().st_ino fs = ext2_filsys() - if self.libext2fs.ext2fs_open(path.encode(), 0, 0, 0, ctypes.byref(fs)) == 0: + if self.libext2fs.ext2fs_open(bytes(path), 0, 0, 0, ctypes.byref(fs)) == 0: try: scan = ext2_inode_scan() try: