Skip to content

Commit

Permalink
Delete extracted libraries on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
dbouron committed Mar 26, 2021
1 parent 18d09a1 commit 38fe1f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/criteo/vips/Vips.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ private static void loadLibraryFromJar(String name) throws IOException {
byte[] buffer = new byte[1024];
int read;
temp = File.createTempFile(libName, "");
temp.deleteOnExit();
try (FileOutputStream fos = new FileOutputStream(temp)) {
while ((read = in.read(buffer)) != -1) {
fos.write(buffer, 0, read);
Expand Down

0 comments on commit 38fe1f6

Please sign in to comment.