Skip to content
Snippets Groups Projects
Unverified Commit ee099287 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

BUG: Delete tmp files after script terminated

parent 32e7e8d5
No related branches found
No related tags found
No related merge requests found
......@@ -217,7 +217,7 @@ public class FileProperties {
}
private static Undoable delete(final File file)
throws IOException, InterruptedException, CaosDBException {
throws IOException, InterruptedException {
if (file.getAbsolutePath().startsWith(FileSystem.getBasepath())) {
final Undoable d;
final File parent = file.getParentFile();
......
......@@ -96,10 +96,10 @@ public class ScriptingResource extends AbstractCaosDBServerResource {
private void deleteTmpFiles() {
for (FileProperties p : deleteFiles) {
try {
p.deleteFile();
p.getFile().delete();
} catch (Exception t) {
if (getLogger().isLoggable(Level.WARNING)) {
getLogger().warning("Could not delete tmp file: " + t.toString());
getLogger().warning("Could not delete tmp file: " + p.getPath() + "\nException: " + t.toString());
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment