commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1617882 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java
Date Thu, 14 Aug 2014 05:38:59 GMT
Author: bodewig
Date: Thu Aug 14 05:38:59 2014
New Revision: 1617882

URL: http://svn.apache.org/r1617882
Log:
deal with files without parent

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java?rev=1617882&r1=1617881&r2=1617882&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java
Thu Aug 14 05:38:59 2014
@@ -73,7 +73,7 @@ public class CLI {
 
                 System.out.println("extracting to " + outFile);
                 File parent = outFile.getParentFile();
-                if (!parent.exists() && !parent.mkdirs()) {
+                if (parent != null && !parent.exists() && !parent.mkdirs())
{
                     throw new IOException("Cannot create " + parent);
                 }
                 FileOutputStream fos = new FileOutputStream(outFile);



Mime
View raw message