peterreilly 2003/11/20 04:08:17 Modified: src/main/org/apache/tools/ant/util FileUtils.java Log: Check if parent file is not null before using it Revision Changes Path 1.59 +3 -3 ant/src/main/org/apache/tools/ant/util/FileUtils.java Index: FileUtils.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/FileUtils.java,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- FileUtils.java 24 Oct 2003 05:44:02 -0000 1.58 +++ FileUtils.java 20 Nov 2003 12:08:17 -0000 1.59 @@ -545,7 +545,7 @@ // ensure that parent dir of dest file exists! // not using getParentFile method to stay 1.1 compat File parent = getParentFile(destFile); - if (!parent.exists()) { + if (parent != null && !parent.exists()) { parent.mkdirs(); } @@ -1383,7 +1383,7 @@ } File parent = getParentFile(to); - if (!parent.exists() && !parent.mkdirs()) { + if (parent != null && !parent.exists() && !parent.mkdirs()) { throw new IOException("Failed to create directory " + parent + " while trying to rename " + from); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]