From d1cdc1451ff9f4bad73de4d60f2f75051133489e Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Fri, 22 Dec 2017 23:50:00 +0100 Subject: [PATCH] borg init: use given --storage-quota for local repo, fixes #3470 --- src/borg/archiver.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index bf4be41a7..3ac27d6df 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -124,6 +124,7 @@ def decorator(method): def wrapper(self, args, **kwargs): location = args.location # note: 'location' must be always present in args append_only = getattr(args, 'append_only', False) + storage_quota = getattr(args, 'storage_quota', None) if argument(args, fake) ^ invert_fake: return method(self, args, repository=None, **kwargs) elif location.proto == 'ssh': @@ -131,8 +132,8 @@ def wrapper(self, args, **kwargs): lock_wait=self.lock_wait, lock=lock, append_only=append_only, args=args) else: repository = Repository(location.path, create=create, exclusive=argument(args, exclusive), - lock_wait=self.lock_wait, lock=lock, - append_only=append_only) + lock_wait=self.lock_wait, lock=lock, append_only=append_only, + storage_quota=storage_quota) with repository: if manifest or cache: kwargs['manifest'], kwargs['key'] = Manifest.load(repository, compatibility)