File tree 2 files changed +6
-1
lines changed
main/java/org/codehaus/plexus/archiver
test/java/org/codehaus/plexus/archiver
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -669,7 +669,7 @@ public void setDestFile( final File destFile )
669
669
{
670
670
this .destFile = destFile ;
671
671
672
- if ( destFile != null )
672
+ if ( destFile != null && destFile . getParentFile () != null )
673
673
{
674
674
destFile .getParentFile ().mkdirs ();
675
675
}
Original file line number Diff line number Diff line change 1
1
package org .codehaus .plexus .archiver ;
2
2
3
+ import java .io .File ;
3
4
import java .io .IOException ;
4
5
import junit .framework .TestCase ;
5
6
@@ -89,4 +90,8 @@ public void testOverridesCanBeReset()
89
90
assertEquals ( -1 , archiver .getOverrideDirectoryMode () );
90
91
}
91
92
93
+ public void testSetDestFileInTheWorkingDir () {
94
+ archiver .setDestFile ( new File ( "archive" ) );
95
+ }
96
+
92
97
}
You can’t perform that action at this time.
0 commit comments