SheetJS / js-cfb

:floppy_disk: OLE File Container Format
https://sheetjs.com/cfb-editor
Apache License 2.0
69 stars 15 forks source link

Bad parenting / hierarchy construction when parent is after R / L sibling tree #15

Open rossj opened 2 years ago

rossj commented 2 years ago

I've noticed some files that show an incorrect folder structure with this library. I believe the dad array is not filled correctly when a node comes before it's parent, and has R or L sibling nodes. I've attached a sample file that demonstrates the issue.

In the attached .cfb file, both some file 1 and some file 2 are sibling files under some folder, but js-cfb shows some file 2 as a root level file.

image

file.zip