Author: onealj
Date: Wed Oct 19 05:18:48 2016
New Revision: 1765531

URL: http://svn.apache.org/viewvc?rev=1765531&view=rev
Log:
on Windows, a directory cannot contain a file and a directory with the same name

Modified:
    poi/trunk/src/java/org/apache/poi/poifs/dev/POIFSDump.java

Modified: poi/trunk/src/java/org/apache/poi/poifs/dev/POIFSDump.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/dev/POIFSDump.java?rev=1765531&r1=1765530&r2=1765531&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/dev/POIFSDump.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/dev/POIFSDump.java Wed Oct 19 
05:18:48 2016
@@ -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);
                 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org
For additional commands, e-mail: commits-h...@poi.apache.org

Reply via email to