pathlib Path uses bytes(), not decode()

This commit is contained in:
Darryl Nixon 2023-07-16 11:28:03 -07:00
parent 6c9cca49b9
commit e69775471f

View file

@ -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: