浏览代码

Fix missing return code check in ChunkIndex._add

(used by ChunkIndex.merge and ChunkIndex.add)
Marian Beermann 9 年之前
父节点
当前提交
3a81a947a1
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      borg/hashindex.pyx

+ 2 - 1
borg/hashindex.pyx

@@ -310,7 +310,8 @@ cdef class ChunkIndex(IndexBase):
             result64 = refcount1 + refcount2
             values[0] = _htole32(min(result64, _MAX_VALUE))
         else:
-            hashindex_set(self.index, key, data)
+            if not hashindex_set(self.index, key, data):
+                raise Exception('hashindex_set failed')
 
     def merge(self, ChunkIndex other):
         cdef void *key = NULL