diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2013-05-03 11:30:41 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2013-05-03 11:30:41 +0000 |
commit | 75faaf7f11c1611f5b98b13b7d6f44c861f857d7 (patch) | |
tree | 7e6d354f8391cbfb86807383a617038fa5b97c30 /src/htscache.c | |
parent | 26e0b7e748badd2dd95d8b5a0743b0af5ea7f78f (diff) |
Fixed zero-length files not being properly handled (not savec on disk, not updated)
Diffstat (limited to 'src/htscache.c')
-rw-r--r-- | src/htscache.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/htscache.c b/src/htscache.c index 6680094..fc8a5b8 100644 --- a/src/htscache.c +++ b/src/htscache.c @@ -598,7 +598,8 @@ static htsblk cache_readex_new(httrackp* opt,cache_back* cache,const char* adr,c intptr_t hash_pos; int hash_pos_return; htsblk r; - memset(&r, 0, sizeof(htsblk)); r.soc=INVALID_SOCKET; + hts_init_htsblk(&r); + //memset(&r, 0, sizeof(htsblk)); r.soc=INVALID_SOCKET; location_default[0] = '\0'; previous_save[0] = previous_save_[0] = '\0'; @@ -947,7 +948,8 @@ static htsblk cache_readex_old(httrackp* opt,cache_back* cache,const char* adr,c int ok=0; int header_only=0; - memset(&r, 0, sizeof(htsblk)); r.soc=INVALID_SOCKET; + hts_init_htsblk(&r); + //memset(&r, 0, sizeof(htsblk)); r.soc=INVALID_SOCKET; if (location) { r.location = location; } else { |