Hello,
I am attaching a patch for small issue I found during my tests described ealier. While using TestClient to copy NDFS file eg.:
TestClient -cp /testfile abc
NullPointerException is thrown when destination file has no parent directory.
Regards,
Piotr
Index: src/java/org/apache/nutch/fs/FileUtil.java
===================================================================
--- src/java/org/apache/nutch/fs/FileUtil.java  (revision 165172)
+++ src/java/org/apache/nutch/fs/FileUtil.java  (working copy)
@@ -47,7 +47,7 @@
         }
 
         File dstParent = dst.getParentFile();
-        if (! nfs.exists(dstParent)) {
+        if ((dstParent != null) && (!nfs.exists(dstParent))) {
             nfs.mkdirs(dstParent);
         }
 

Reply via email to