diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/htscore.c | 12 | ||||
-rw-r--r-- | src/htsglobal.h | 2 | ||||
-rw-r--r-- | src/htsparse.c | 16 |
3 files changed, 24 insertions, 6 deletions
diff --git a/src/htscore.c b/src/htscore.c index 650633e..1d1bc88 100644 --- a/src/htscore.c +++ b/src/htscore.c @@ -2934,9 +2934,15 @@ int back_fill(struct_back* sback,httrackp* opt,cache_back* cache,lien_url** lien if (numero_passe!=0) ok=0; } - if (ok && liens[p]->sav != NULL && liens[p]->sav[0] != '\0' - && hash_read(opt->hash,liens[p]->sav,"",0,opt->urlhack) >= 0) // lookup in liens_record - { + + // Why in hell did I do that ? + //if (ok && liens[p]->sav != NULL && liens[p]->sav[0] != '\0' + // && hash_read(opt->hash,liens[p]->sav,"",0,opt->urlhack) >= 0) // lookup in liens_record + //{ + // ok = 0; + //} + if (liens[p]->sav == NULL || liens[p]->sav[0] == '\0' + || hash_read(opt->hash,liens[p]->sav,"",0,opt->urlhack) < 0) { ok = 0; } diff --git a/src/htsglobal.h b/src/htsglobal.h index 2b9e0a4..c4db403 100644 --- a/src/htsglobal.h +++ b/src/htsglobal.h @@ -41,7 +41,7 @@ Please visit our Website: http://www.httrack.com // Version (also check external version information) #define HTTRACK_VERSION "3.45" -#define HTTRACK_VERSIONID "3.45.1" +#define HTTRACK_VERSIONID "3.45.2" #define HTTRACK_AFF_VERSION "3.x" #define HTTRACK_LIB_VERSION "2.0" diff --git a/src/htsparse.c b/src/htsparse.c index 146f8e9..2ee266a 100644 --- a/src/htsparse.c +++ b/src/htsparse.c @@ -3473,12 +3473,24 @@ int hts_mirror_check_moved(htsmoduleStruct* str, htsmoduleStructExtended* stre) if (opt->log!=NULL) { HTS_LOG(opt,LOG_ERROR); fprintf(opt->log,"Can not remove old file %s"LF,urlfil); test_flush; + error = 1; } } } else { if (opt->log!=NULL) { - HTS_LOG(opt,LOG_WARNING); fprintf(opt->log,"Unexpected 412/416 error (%s) for %s%s"LF,r->msg,urladr,urlfil); + HTS_LOG(opt,LOG_WARNING); fprintf(opt->log,"Unexpected 412/416 error (%s) for %s%s, '%s' could not be found on disk"LF,r->msg,urladr,urlfil,liens[ptr]->sav != NULL ? liens[ptr]->sav : ""); test_flush; + error = 1; + } + } + + // Error ? + if (error) { + if (!opt->errpage) { + if (r->adr) { // désalloc + freet(r->adr); + r->adr=NULL; + } } } } else if (r->statuscode!=HTTP_OK) { @@ -3619,8 +3631,8 @@ int hts_mirror_check_moved(htsmoduleStruct* str, htsmoduleStructExtended* stre) freet(r->adr); r->adr=NULL; } - error=1; // erreur! } + error=1; // erreur! } // FIN rattrapage des 301,302,307.. // ------------------------------------------------------------ |