mirror of https://github.com/apache/maven.git
Be defensive about creating directories for files
Maven 3.4 snapshots are now being published with invalid zip files, where the entries are listed before their parent. So the logic in the Installer is faulty: you have to mkdirs() on all entries to be sure that the directory exists before you write the file.
This commit is contained in:
parent
ec6db49837
commit
9621b2aaff
|
@ -170,6 +170,7 @@ public class Installer {
|
|||
continue;
|
||||
}
|
||||
|
||||
new File(dest, entry.getName()).getParentFile().mkdirs();
|
||||
copyInputStream(zipFile.getInputStream(entry), new BufferedOutputStream(new FileOutputStream(new File(dest, entry.getName()))));
|
||||
}
|
||||
zipFile.close();
|
||||
|
|
Loading…
Reference in New Issue