git://git.nikiroo.be
/
nikiroo-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
085a2f9
)
Fix source (type)) lost on redownload: again
author
Niki Roo
<niki@nikiroo.be>
Sun, 26 Nov 2017 15:37:08 +0000
(16:37 +0100)
committer
Niki Roo
<niki@nikiroo.be>
Sun, 26 Nov 2017 15:37:08 +0000
(16:37 +0100)
src/be/nikiroo/fanfix/library/CacheLibrary.java
patch
|
blob
|
blame
|
history
diff --git
a/src/be/nikiroo/fanfix/library/CacheLibrary.java
b/src/be/nikiroo/fanfix/library/CacheLibrary.java
index 38fb7b3193e1b13da59e2abc285d2a6bd0461dfa..d653332a73673aaff0bbce6b0128cb901c15b94b 100644
(file)
--- a/
src/be/nikiroo/fanfix/library/CacheLibrary.java
+++ b/
src/be/nikiroo/fanfix/library/CacheLibrary.java
@@
-153,7
+153,9
@@
public class CacheLibrary extends BasicLibrary {
pg.addProgress(pgCache, 1);
pg.addProgress(pgOrig, 1);
pg.addProgress(pgCache, 1);
pg.addProgress(pgOrig, 1);
- cacheLib.changeSource(luid, newSource, pgCache);
+ if (isCached(luid)) {
+ cacheLib.changeSource(luid, newSource, pgCache);
+ }
pgCache.done();
lib.changeSource(luid, newSource, pgOrig);
pgOrig.done();
pgCache.done();
lib.changeSource(luid, newSource, pgOrig);
pgOrig.done();
@@
-184,8
+186,10
@@
public class CacheLibrary extends BasicLibrary {
* in case of I/O error
*/
public void clearFromCache(String luid) throws IOException {
* in case of I/O error
*/
public void clearFromCache(String luid) throws IOException {
- cacheLib.delete(luid);
- clearCache();
+ if (isCached(luid)) {
+ cacheLib.delete(luid);
+ clearCache();
+ }
}
// All the following methods are only used by Save and Delete in
}
// All the following methods are only used by Save and Delete in