Delete unpacked jars when the JVM exits
Update `JarFileArchive` so that any unpacked files are now deleted when the JVM exits. Closes gh-25773
This commit is contained in:
parent
05f61bccea
commit
ec21202d54
|
@ -158,6 +158,7 @@ public class JarFileArchive implements Archive {
|
|||
|
||||
private void unpack(JarEntry entry, Path path) throws IOException {
|
||||
createFile(path);
|
||||
path.toFile().deleteOnExit();
|
||||
try (InputStream inputStream = this.jarFile.getInputStream(entry);
|
||||
OutputStream outputStream = Files.newOutputStream(path, StandardOpenOption.WRITE,
|
||||
StandardOpenOption.TRUNCATE_EXISTING)) {
|
||||
|
|
Loading…
Reference in New Issue