TempFiles: root to NULL on close: early bug detect
authorNiki Roo <niki@nikiroo.be>
Wed, 8 Aug 2018 10:18:36 +0000 (12:18 +0200)
committerNiki Roo <niki@nikiroo.be>
Wed, 8 Aug 2018 10:18:36 +0000 (12:18 +0200)
src/be/nikiroo/utils/TempFiles.java

index a16e9e40c50e152bb6ef7e31d0ba59d0207b1041..186bfb8938ad42ba9300abb80fb3c6180ab30b9c 100644 (file)
@@ -130,6 +130,7 @@ public class TempFiles implements Closeable {
        public synchronized void close() throws IOException {
                IOUtils.deltree(root); // NO exception here
                root.getParentFile().delete(); // only if empty
+               root = null;
        }
 
        @Override