When using the Core.initDownload() method, the files downloaded to the temporary directory are not deleted when the application quits, despite the code suggesting that they should be deleted. The relevant code snippet is as follows:
// Create a new temporary directory
// We need to do this, because we may not change the filename on Windows
File tempDir = new File(System.getProperty("java.io.tmpdir"), "java-"+name+System.nanoTime());
if(!tempDir.mkdir())
throw new IOException("Cannot create temporary directory");
tempDir.deleteOnExit();
// Create a temporary file inside our directory (with a "normal" name)
File temp = new File(tempDir, name+suffix);
temp.deleteOnExit();
When using the
Core.initDownload()
method, the files downloaded to the temporary directory are not deleted when the application quits, despite the code suggesting that they should be deleted. The relevant code snippet is as follows: