This is an automated email from the ASF dual-hosted git repository.
lewismc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nutch.git
The following commit(s) were added to refs/heads/master by this push:
new 2724578 NUTCH-2850 Method ignores exceptional return value (#570)
2724578 is described below
commit 2724578ab41cb9e8098975bddbde7df2085b1c61
Author: Lewis John McGibbney <[email protected]>
AuthorDate: Thu Feb 18 07:21:43 2021 -0800
NUTCH-2850 Method ignores exceptional return value (#570)
---
src/java/org/apache/nutch/tools/FileDumper.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/java/org/apache/nutch/tools/FileDumper.java
b/src/java/org/apache/nutch/tools/FileDumper.java
index 4e7338e..65c7dca 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));