From 0405c1a1bba5d800a445152eb8b1e27cea4be255 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 5 May 2018 14:56:13 +0200 Subject: [PATCH] fix borg config --cache (minimal change) this was broken by previous changeset. now doing just a minimal change for better diff display, see also next commit. (cherry picked from commit 697bb3640228915d95260070c4d769a0e703e9a9) --- src/borg/archiver.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index f52d1b726..bb0ac4575 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -1573,6 +1573,11 @@ class Archiver: section = args.cache and "cache" or "repository" name = args.name + if args.cache: + manifest, key = Manifest.load(repository, (Manifest.Operation.WRITE,)) + assert_secure(repository, manifest) + cache = Cache(repository, key, manifest, lock_wait=self.lock_wait) + if args.cache: cache.cache_config.load() config = cache.cache_config._config @@ -1601,6 +1606,9 @@ class Archiver: except (configparser.NoOptionError, configparser.NoSectionError) as e: print(e, file=sys.stderr) return EXIT_WARNING + + if args.cache: + cache.close() return EXIT_SUCCESS def do_debug_info(self, args):