aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java b/src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java
index c76c43f54b..8282c00576 100644
--- a/src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java
+++ b/src/examples/src/org/apache/poi/hpsf/examples/CopyCompare.java
@@ -401,11 +401,13 @@ public class CopyCompare
final String name,
final DocumentInputStream stream)
throws IOException {
+ // create the directories to the document
+ final DirectoryEntry de = getPath(poiFs, path);
+ // check the parameters after the directories have been created
if (stream == null || name == null) {
// Empty directory
return;
}
- final DirectoryEntry de = getPath(poiFs, path);
final ByteArrayOutputStream out = new ByteArrayOutputStream();
int c;
while ((c = stream.read()) != -1) {