diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-11-23 08:27:26 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-11-23 08:27:26 +0000 |
commit | 240018c9054457781da6d8795e809d16dde60667 (patch) | |
tree | 5eebd4173020ea968f585771ab1f109addf981b0 | |
parent | 9e41c833757d7a32718c31708662f9c1b23d5946 (diff) | |
download | obnam-240018c9054457781da6d8795e809d16dde60667.tar.gz |
Add --fsck-skip-files option
-rw-r--r-- | obnamlib/plugins/fsck_plugin.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/obnamlib/plugins/fsck_plugin.py b/obnamlib/plugins/fsck_plugin.py index f1ba96ee..0d7a3889 100644 --- a/obnamlib/plugins/fsck_plugin.py +++ b/obnamlib/plugins/fsck_plugin.py @@ -151,7 +151,10 @@ class CheckGeneration(WorkItem): if n is None: self.error('%s:%s: no total data' % (self.client_name, self.genid)) - return [CheckDirectory(self.client_name, self.genid, '/')] + if self.settings['fsck-skip-dirs']: + return [] + else: + return [CheckDirectory(self.client_name, self.genid, '/')] class CheckGenerationIdsAreDifferent(WorkItem): @@ -292,6 +295,9 @@ class FsckPlugin(obnamlib.ObnamPlugin): ['fsck-last-generation-only'], 'check only the last generation for each client') self.app.settings.boolean( + ['fsck-skip-dirs'], + 'do not check anything about directories and their files') + self.app.settings.boolean( ['fsck-skip-files'], 'do not check anything about files') self.app.settings.boolean( |