diff --git a/src/bees-types.cc b/src/bees-types.cc index 54a4959..b418fda 100644 --- a/src/bees-types.cc +++ b/src/bees-types.cc @@ -71,7 +71,18 @@ operator<<(ostream &os, const BeesFileRange &bfr) if (bfr.end() == numeric_limits::max()) { os << "- [" << to_hex(bfr.begin()) << "..eof]"; } else { - os << pretty(bfr.size()) << " [" << to_hex(bfr.begin()) << ".." << to_hex(bfr.end()) << "]"; + os << pretty(bfr.size()) << " "; + if (bfr.begin() != 0) { + os << "[" << to_hex(bfr.begin()); + } else { + os << "("; + } + os << ".." << to_hex(bfr.end()); + if (!!bfr.m_fd && bfr.end() >= bfr.file_size()) { + os << ")"; + } else { + os << "]"; + } } if (bfr.m_fid) { os << " fid = " << bfr.m_fid;