mirror of https://github.com/apache/poi.git
on Windows, a directory cannot contain a file and a directory with the same name
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765531 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5fed0edcae
commit
3f635e5be5
|
@ -71,7 +71,9 @@ public class POIFSDump {
|
|||
}
|
||||
try {
|
||||
DirectoryEntry root = fs.getRoot();
|
||||
File file = new File(new File(filename).getName(), root.getName());
|
||||
String filenameWithoutPath = new File(filename).getName();
|
||||
File dumpDir = new File(filenameWithoutPath + "_dump");
|
||||
File file = new File(dumpDir, root.getName());
|
||||
if (!file.exists() && !file.mkdirs()) {
|
||||
throw new IOException("Could not create directory " + file);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue