summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2012-03-21 20:00:28 +0000
committerXavier Roche <xroche@users.noreply.github.com>2012-03-21 20:00:28 +0000
commitdc0db67742d74b8a4081e51e76a62e3961414147 (patch)
tree46043320f0fc307a5095457b466769e9a1df88da /src
parent9445e139da916284b6d0e426e994a1c1910ead7b (diff)
Fixed incredible bug leading to reject html files from cache not present on disk (spotted by Alain Desilets)
Diffstat (limited to 'src')
-rw-r--r--src/htsback.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/htsback.c b/src/htsback.c
index 1c77c29..fae9bbc 100644
--- a/src/htsback.c
+++ b/src/htsback.c
@@ -1453,7 +1453,8 @@ int back_add(struct_back* sback,httrackp* opt,cache_back* cache,char* adr,char*
// Ok, noté en cache->. mais bien présent dans le cache ou sur disque?
#if HTS_FAST_CACHE
- if (hash_pos_return) {
+ // negative values when data is not in cache
+ if (hash_pos_return < 0) {
#else
if (a) {
#endif
@@ -1514,12 +1515,12 @@ int back_add(struct_back* sback,httrackp* opt,cache_back* cache,char* adr,char*
FILE* fp=fopen(fconv(catbuff,save),"wb");
if (fp) fclose(fp);
if (opt->log!=NULL) {
- HTS_LOG(opt,LOG_WARNING); fprintf(opt->log,"Previous file not found (erased by user ?), ignoring: %s%s"LF,back[p].url_adr,back[p].url_fil); test_flush;
+ HTS_LOG(opt,LOG_WARNING); fprintf(opt->log,"Previous file '%s' not found (erased by user ?), ignoring: %s%s"LF,save,back[p].url_adr,back[p].url_fil); test_flush;
}
}
} else {
if (opt->log!=NULL) {
- HTS_LOG(opt,LOG_WARNING); fprintf(opt->log,"Previous file not found (erased by user ?), recatching: %s%s"LF,back[p].url_adr,back[p].url_fil); test_flush;
+ HTS_LOG(opt,LOG_WARNING); fprintf(opt->log,"Previous file '%s' not found (erased by user ?), recatching: %s%s"LF,save,back[p].url_adr,back[p].url_fil); test_flush;
}
}
}