Skip to content

Commit 69d31b4

Browse files
committed
[fix] Fix problem with python-ext4 API change from version 1.3.1->1.3.2
Semantic versioning is a myth.
1 parent e629c9c commit 69d31b4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • core/ratarmountcore/mountsource/formats

core/ratarmountcore/mountsource/formats/ext4.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def _convert_ext4_directory_entry_to_file_info(inode) -> FileInfo:
5959
return FileInfo(
6060
size = inode.i_size,
6161
mtime = inode.i_mtime,
62-
mode = inode.i_mode.value,
62+
mode = inode.i_mode.value if hasattr(inode.i_mode, 'value') else inode.i_mode,
6363
linkname = "", # TODO I don't see any data for links... in the Inode struct
6464
uid = inode.i_uid,
6565
gid = inode.i_gid,
@@ -100,7 +100,7 @@ def list(self, path: str) -> Optional[Union[Iterable[str], dict[str, FileInfo]]]
100100

101101
@overrides(MountSource)
102102
def list_mode(self, path: str) -> Optional[Union[Iterable[str], dict[str, int]]]:
103-
return self._list(path, lambda inode: inode.i_mode.value)
103+
return self._list(path, lambda inode: inode.i_mode.value if hasattr(inode.i_mode, 'value') else inode.i_mode)
104104

105105
@overrides(MountSource)
106106
def lookup(self, path: str, fileVersion: int = 0) -> Optional[FileInfo]:

0 commit comments

Comments
 (0)