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
Fix source (type)) lost on redownload: again
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
library
/
CacheLibrary.java
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