// On Linux at least the deleteOnExit seems not to work very well
// for directories that contain files, even if they have been marked
// for deletion upon exit as well. Note that on Windows there are
// file locking issues so we mark files for deletion after this JVM exits.
if (stagingDir.exists()) {
fm.deleteRecursively(stagingDir, null,
FileManager.DeletionPolicy.DELETE_ON_EXIT_IF_UNSUCCESSFUL);
}
} catch (IOException e) {
throw ApplicationException.createFileSystemException(