From: Heng Li Date: Tue, 7 Jul 2009 15:53:29 +0000 (+0000) Subject: Release samtools-0.1.5c (fixed a bug in piping) X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=63a8030e548830615a3dd9debd7d093c3096f9af;p=samtools.git Release samtools-0.1.5c (fixed a bug in piping) --- diff --git a/bamtk.c b/bamtk.c index 536924c..3386836 100644 --- a/bamtk.c +++ b/bamtk.c @@ -4,7 +4,7 @@ #include "bam.h" #ifndef PACKAGE_VERSION -#define PACKAGE_VERSION "0.1.5b (r383)" +#define PACKAGE_VERSION "0.1.5c (r385)" #endif int bam_taf2baf(int argc, char *argv[]); diff --git a/knetfile.c b/knetfile.c index 12dc2d1..cef197d 100644 --- a/knetfile.c +++ b/knetfile.c @@ -226,7 +226,12 @@ off_t knet_read(knetFile *fp, void *buf, off_t len) off_t l = 0; if (fp->fd < 0) return 0; if (fp->type == KNF_TYPE_LOCAL) { - l = read(fp->fd, buf, len); + off_t rest = len, curr; + while (rest) { + curr = read(fp->fd, buf + l, rest); + if (curr == 0) break; + l += curr; rest -= curr; + } fp->offset += l; } else { off_t rest = len, curr;