Skip to content

Commit 1c6f9eb

Browse files
committed
fix(yaffs): update node in place when duplicate are observed.
Deletion and re-insertion would lead to broken trees otherwise.
1 parent 1176c01 commit 1c6f9eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

unblob/handlers/filesystem/yaffs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,8 @@ def insert_entry(self, entry: YAFFSEntry):
425425
# or the file got truncated / rewritten.
426426
# Given that YAFFS is a log filesystem, whichever chunk comes
427427
# last takes precendence.
428-
self.file_entries.remove_node(entry.object_id)
428+
self.file_entries.update_node(entry.object_id, data=entry)
429+
return
429430

430431
if entry.object_id == entry.parent_obj_id:
431432
self.file_entries.create_node(

0 commit comments

Comments
 (0)