X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=razf.c;h=e7499f9f61e6c2fae4ec71a5f4a500ed5b151fe8;hb=0ccd9d36ebf35ce620a8248ecf4336c84065e6c0;hp=2ce364e91ecc2229bf17a2426194cc4b70a96df5;hpb=5078180f65e9723fa339c78d692b30a00dedcd6c;p=samtools.git diff --git a/razf.c b/razf.c index 2ce364e..e7499f9 100644 --- a/razf.c +++ b/razf.c @@ -444,7 +444,8 @@ static RAZF* razf_open_r(int fd, int _load_index){ goto UNSEEKABLE; } #ifdef _USE_KNETFILE - if(knet_seek(fp, rz->end, SEEK_SET) != rz->end){ + knet_seek(fp, rz->end, SEEK_SET); + if(knet_tell(fp) != rz->end){ knet_seek(fp, rz->in, SEEK_SET); #else if(lseek(fd, rz->end, SEEK_SET) != rz->end){ @@ -497,7 +498,7 @@ static inline RAZF* _razf_open(const char *filename, const char *mode, int _load #ifdef _USE_KNETFILE knetFile *fd = knet_open(filename, "r"); if (fd == 0) { - fprintf(stderr, "[_razf_open] fail to open remote file %s\n", filename); + fprintf(stderr, "[_razf_open] fail to open %s\n", filename); return NULL; } #else