From: Niki Roo Date: Sun, 24 Feb 2019 09:52:44 +0000 (+0100) Subject: fix TempFilesTest X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=0c7311024bc6d43732b834dddd7619bdc0310c97;p=fanfix-jexer.git fix TempFilesTest --- diff --git a/src/be/nikiroo/utils/test/TempFilesTest.java b/src/be/nikiroo/utils/test/TempFilesTest.java index 905ca4d..460d396 100644 --- a/src/be/nikiroo/utils/test/TempFilesTest.java +++ b/src/be/nikiroo/utils/test/TempFilesTest.java @@ -86,12 +86,22 @@ class TempFilesTest extends TestLauncher { } private class RootTempFiles extends TempFiles { + private File root = null; + public RootTempFiles(String name) throws IOException { super(name); } public File getRoot() { - return root; + if (root != null) + return root; + return super.root; + } + + @Override + public synchronized void close() throws IOException { + root = super.root; + super.close(); } } }