1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-29 03:06:12 +00:00

Merge pull request #3482 from ThomasWaldmann/fix-borg-init-quota-1.1

borg init: use given --storage-quota for local repo, fixes #3470 (1.1)
This commit is contained in:
TW 2017-12-23 21:54:08 +01:00 committed by GitHub
commit 128ed2da47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)