Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static File createTmpFile(InputStream inputStream, String name, String ex
tmpFile = File.createTempFile(name, '.' + ext, tmpDirFile);
}

// tmpFile.deleteOnExit();
tmpFile.deleteOnExit();

try (FileOutputStream fos = new FileOutputStream(tmpFile)) {
int read = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public File execute(String uri, String queryParam) throws WxErrorException, IOEx
try (BufferedSink sink = Okio.buffer(Okio.sink(file))) {
sink.writeAll(response.body().source());
}
file.deleteOnExit();
return file;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public File execute(String uri, WxMpQrCodeTicket data) throws WxErrorException,
try (BufferedSink sink = Okio.buffer(Okio.sink(temp))) {
sink.writeAll(response.body().source());
}
temp.deleteOnExit();

return temp;
}
}