git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bufixes
[fanfix.git]
/
src
/
be
/
nikiroo
/
utils
/
Cache.java
diff --git
a/src/be/nikiroo/utils/Cache.java
b/src/be/nikiroo/utils/Cache.java
index dbe2020188ec44ae2dfd673529f49a8e6abdf462..cf8a780ef9ae49f99b5536a5d549e5522a01837b 100644
(file)
--- a/
src/be/nikiroo/utils/Cache.java
+++ b/
src/be/nikiroo/utils/Cache.java
@@
-8,6
+8,8
@@
import java.io.InputStream;
import java.net.URL;
import java.util.Date;
import java.net.URL;
import java.util.Date;
+import be.nikiroo.utils.streams.MarkableFileInputStream;
+
/**
* A generic cache system, with special support for {@link URL}s.
* <p>
/**
* A generic cache system, with special support for {@link URL}s.
* <p>
@@
-319,8
+321,9
@@
public class Cache {
* in case of I/O error
*/
private void save(InputStream in, File cached) throws IOException {
* 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);
IOUtils.write(in, cached);
+ clean(true, dir, 10);
}
/**
}
/**