mirror of https://github.com/borgbackup/borg.git
Fix cache reinitalization.
This commit is contained in:
parent
d0d8dc5f1e
commit
f576c251b8
|
@ -37,17 +37,16 @@ class Cache(object):
|
|||
def init(self):
|
||||
"""Initializes cache by fetching and reading all archive indicies
|
||||
"""
|
||||
self.summap = {}
|
||||
self.chunkmap = {}
|
||||
self.archives = []
|
||||
self.tid = self.store.tid
|
||||
if self.store.tid == 0:
|
||||
return
|
||||
print 'Recreating cache...'
|
||||
for id in self.store.list(NS_ARCHIVES):
|
||||
for id in list(self.store.list(NS_ARCHIVES)):
|
||||
archive = cPickle.loads(zlib.decompress(self.store.get(NS_ARCHIVES, id)))
|
||||
self.archives.append(archive['name'])
|
||||
for id, sum, csize, osize in archive['chunks']:
|
||||
for id, csize, osize in archive['chunks']:
|
||||
if self.seen_chunk(id):
|
||||
self.chunk_incref(id)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue