From: Niki Roo Date: Sun, 14 Apr 2019 11:40:13 +0000 (+0200) Subject: fix Cache X-Git-Tag: fanfix-3.0.1~29^2~155 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=05c4f401056abe16517a0b0d1ccb5841fa3dfcbb;p=fanfix.git fix Cache --- diff --git a/src/be/nikiroo/utils/Cache.java b/src/be/nikiroo/utils/Cache.java index dbe2020..ce33592 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); } /**