Bug 60272 - POIFSDump throws IOException "could not create directory" on Windows (at least)
Summary: POIFSDump throws IOException "could not create directory" on Windows (at least)
Alias: None
Product: POI
Classification: Unclassified
Component: POIFS (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2016-10-18 17:00 UTC by Tim Allison
Modified: 2016-10-19 05:45 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Tim Allison 2016-10-18 17:00:02 UTC
When I try to run POIFSDump on Windows, I get: 
Exception in thread "main" java.io.IOException: Could not create directory 60162.ppt\Root Entry

If I modify the file name:

                File file = new File(new File(filename).getName()+"_dump", root.getName());

all works.  Anyone mind if I change this?
Comment 1 Dominik Stadler 2016-10-18 19:43:39 UTC
I would say go ahead, this is a dev-tool so not something anybody else would usually run.
Comment 2 Javen O'Neal 2016-10-19 05:19:31 UTC
Modified in r1765531.
Comment 3 Javen O'Neal 2016-10-19 05:45:28 UTC
I'm guessing the only way this worked before is if the MS Office files were located in a different directory (and thus filename was a path) from where the output dump directory was created (presumably in the same directory as where POIFSDump was run, since new File(filename).getName() strips the parent directory portion of filename.