build_full_paths does not prepend "root_entry/" if child is before parent #5

Closed
opened 2018-12-12 17:46:04 +00:00 by rossj · 0 comments
rossj commented 2018-12-12 17:46:04 +00:00 (Migrated from github.com)

I came across and issue where the returned FullPaths array from a cfb.parse call does not properly append the root name (root_entry/) to child nodes (with depth greater than 1) that appear before their parent node.

It seems that in such a situation, build_full_paths properly constructs the dad tree, but terminates the final path construction loop too early, before it has prepended root_entry/.

I have created and attached a sample file the demonstrates the issue.

The returned FullPaths array is:

[
    "Root Entry/",
    "some folder/some child",
    "Root Entry/some folder/"
]

Despite "some child" being a child of "some folder"

Here is the view from DFVIEW.EXE
image

path-test.zip

I came across and issue where the returned `FullPaths` array from a `cfb.parse` call does not properly append the root name (`root_entry/`) to child nodes (with depth greater than 1) that appear before their parent node. It seems that in such a situation, `build_full_paths` properly constructs the `dad` tree, but terminates the final path construction loop too early, before it has prepended `root_entry/`. I have created and attached a sample file the demonstrates the issue. The returned `FullPaths` array is: ```javascript [ "Root Entry/", "some folder/some child", "Root Entry/some folder/" ] ``` Despite "some child" being a child of "some folder" Here is the view from DFVIEW.EXE ![image](https://user-images.githubusercontent.com/735679/49888023-eb440900-fe0b-11e8-8180-85ef7d623099.png) [path-test.zip](https://github.com/SheetJS/js-cfb/files/2672924/path-test.zip)
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/js-cfb#5
No description provided.