diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-11-24 16:10:19 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-11-24 16:10:19 +0000 |
commit | 64e0fc794894934b721c1c6e92438db395b878d9 (patch) | |
tree | 47105408e8062a71d785668092402f06c31150bb | |
parent | c0b620d7526f9ca1e8ffba3037bdeb68fc72d425 (diff) | |
download | obnam-64e0fc794894934b721c1c6e92438db395b878d9.tar.gz |
Open forest in write-mode if fixing
-rw-r--r-- | obnamlib/plugins/fsck_plugin.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/obnamlib/plugins/fsck_plugin.py b/obnamlib/plugins/fsck_plugin.py index 6ea99085..dd81e218 100644 --- a/obnamlib/plugins/fsck_plugin.py +++ b/obnamlib/plugins/fsck_plugin.py @@ -252,10 +252,10 @@ class CheckBTree(WorkItem): logging.debug('B-tree %s does not exist, skipping' % self.dirname) return logging.debug('Checking B-tree %s' % self.dirname) - forest = larch.open_forest(allow_writes=False, dirname=self.dirname, + fix = self.settings['fsck-fix'] + forest = larch.open_forest(allow_writes=fix, dirname=self.dirname, vfs=self.repo.fs) - fsck = larch.fsck.Fsck(forest, self.warning, self.error, - self.settings['fsck-fix']) + fsck = larch.fsck.Fsck(forest, self.warning, self.error, fix) for work in fsck.find_work(): yield work |