directories don't always come first - make them if they don't exist

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@164394 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-04-23 15:21:31 +00:00
parent 657fde08f4
commit 09764d0531

View File

@ -222,14 +222,11 @@ private void unpackJar( File file, File tempLocation )
{
JarEntry entry = (JarEntry) e.nextElement();
if ( entry.isDirectory() )
if ( !entry.isDirectory() )
{
new File( tempLocation, entry.getName() ).mkdir();
}
else
{
IOUtil.copy( jar.getInputStream( entry ),
new FileOutputStream( new File( tempLocation, entry.getName() ) ) );
File outFile = new File( tempLocation, entry.getName() );
outFile.getParentFile().mkdirs();
IOUtil.copy( jar.getInputStream( entry ), new FileOutputStream( outFile ) );
}
}
}