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

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

Location:
branches/0.11-stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/0.11-stable

    • Property svn:mergeinfo changed
      /trunk (added)merged: 3162
  • branches/0.11-stable/yat/omic/BamFile.cc

    r3080 r3163  
    140140  void OutBamFile::write(const BamRead& read)
    141141  {
    142     if (!samwrite(sf_, read.bam_)) {
     142    if (samwrite(sf_, read.bam_)<=0) {
    143143      // FIXME if wanted perhaps we should throw an OutBamFile::error
    144144      // instead that can hold \a read
Note: See TracChangeset for help on using the changeset viewer.