mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
do not set deleteOnExit if sys prop set to false
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922788 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9951e8dfc1
commit
75729edcea
@ -83,8 +83,8 @@ public class DefaultTempFileCreationStrategy implements TempFileCreationStrategy
|
||||
// Generate a unique new filename
|
||||
File newFile = Files.createTempFile(dir.toPath(), prefix, suffix).toFile();
|
||||
|
||||
// Set the delete on exit flag, but only when explicitly disabled
|
||||
if (System.getProperty(DELETE_FILES_ON_EXIT) != null) {
|
||||
// Set the delete on exit flag if requested
|
||||
if (Boolean.getBoolean(DELETE_FILES_ON_EXIT)) {
|
||||
newFile.deleteOnExit();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user