From 0c7311024bc6d43732b834dddd7619bdc0310c97 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Sun, 24 Feb 2019 10:52:44 +0100 Subject: [PATCH] fix TempFilesTest --- src/be/nikiroo/utils/test/TempFilesTest.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/be/nikiroo/utils/test/TempFilesTest.java b/src/be/nikiroo/utils/test/TempFilesTest.java index 905ca4d8..460d396e 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(); } } } -- 2.27.0