From: Niki Roo Date: Sun, 14 Apr 2019 11:40:13 +0000 (+0200) Subject: fix Cache X-Git-Tag: fanfix-swing-0.0.1~21^2~162 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=05c4f401056abe16517a0b0d1ccb5841fa3dfcbb;p=fanfix-swing.git fix Cache --- diff --git a/src/be/nikiroo/utils/Cache.java b/src/be/nikiroo/utils/Cache.java index dbe20201..ce33592e 100644 --- a/src/be/nikiroo/utils/Cache.java +++ b/src/be/nikiroo/utils/Cache.java @@ -319,8 +319,9 @@ public class Cache { * in case of I/O error */ private void save(InputStream in, File cached) throws IOException { - clean(true, dir, 10); + // We delete AFTER so not to remove the subdir we will use... IOUtils.write(in, cached); + clean(true, dir, 10); } /**