Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-2850 Method ignores exceptional return value (#570)

Lewis John McGibbney2724578ab41c
diff --git a/src/java/org/apache/nutch/tools/FileDumper.java b/src/java/org/apache/nutch/tools/FileDumper.java
index 4e7338e08..65c7dca38 100644
--- a/src/java/org/apache/nutch/tools/FileDumper.java
+++ b/src/java/org/apache/nutch/tools/FileDumper.java
@@ -234,7 +234,9 @@ public class FileDumper {
File fullOutputDir = new File(org.apache.commons.lang3.StringUtils.join(Arrays.copyOf(splitPath, splitPath.length - 1), "/"));
if (!fullOutputDir.exists()) {
- fullOutputDir.mkdirs();
+ if(!fullOutputDir.mkdirs());
+ throw new Exception("Unable to create: ["
+ + fullOutputDir.getAbsolutePath() + "]");
}
} else {
outputFullPath = String.format("%s/%s", fullDir, DumpFileUtil.createFileName(md5Ofurl, baseName, extension));