Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

[NSE-1114] Remove temp directory without FileUtils.forceDeleteOnExit #1131

Merged
merged 1 commit into from
Oct 14, 2022
Merged
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 @@ -82,7 +82,8 @@ private JniUtils(String _tmp_dir) throws IOException, IllegalAccessException, Il
} else {
Path folder = Paths.get(_tmp_dir);
Path path = Files.createTempDirectory(folder, "spark_columnar_plugin_");
FileUtils.forceDeleteOnExit(new File(path.toUri()));
Runtime.getRuntime().addShutdownHook(
new Thread(() -> FileUtils.deleteQuietly(path.toFile())));
tmp_dir = path.toAbsolutePath().toString();
}
}
Expand Down