Skip to content

Commit

Permalink
Yaffs: extract files with correct mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Fasano committed Mar 14, 2024
1 parent 2e4f43a commit 5a538ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unblob/handlers/filesystem/yaffs.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,9 @@ def extract_entry(self, entry: YAFFSEntry, fs: FileSystem):

fs.mknod(out_path, entry.st_mode, entry.st_rdev)
elif entry.object_type == YaffsObjectType.DIRECTORY:
fs.mkdir(out_path, exist_ok=True)
fs.mkdir(out_path, exist_ok=True, mode=entry.st_mode)
elif entry.object_type == YaffsObjectType.FILE:
fs.write_chunks(out_path, self.get_file_chunks(entry))
fs.write_chunks(out_path, self.get_file_chunks(entry), mode=entry.st_mode)
elif entry.object_type == YaffsObjectType.SYMLINK:
fs.create_symlink(src=Path(entry.alias), dst=out_path)
elif entry.object_type == YaffsObjectType.HARDLINK:
Expand Down

0 comments on commit 5a538ed

Please sign in to comment.