Ignore:
Timestamp:
Jan 15, 2014, 9:01:08 AM (8 years ago)
Author:
Peter
Message:

refs #778. samwrite returns -1 if file is closed, so correct code to detect when this happens.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/omic/BamFile.cc

    r3160 r3162  
    162162  void OutBamFile::write(const BamRead& read)
    163163  {
    164     if (!samwrite(sf_, read.bam_)) {
     164    if (samwrite(sf_, read.bam_)<=0) {
    165165      // FIXME if wanted perhaps we should throw an OutBamFile::error
    166166      // instead that can hold \a read
Note: See TracChangeset for help on using the changeset viewer.