mirror of
https://github.com/borgbackup/borg.git
synced 2025-02-23 14:41:43 +00:00
use commit() in borg with-lock, fixes #1867
This commit is contained in:
parent
9bd522819e
commit
808d24d088
1 changed files with 7 additions and 1 deletions
|
@ -1666,7 +1666,13 @@ def do_with_lock(self, args, repository):
|
|||
# we exit with the return code we get from the subprocess
|
||||
return subprocess.call([args.command] + args.args)
|
||||
finally:
|
||||
repository.rollback()
|
||||
# we need to commit the "no change" operation we did to the manifest
|
||||
# because it created a new segment file in the repository. if we would
|
||||
# roll back, the same file would be later used otherwise (for other content).
|
||||
# that would be bad if somebody uses rsync with ignore-existing (or
|
||||
# any other mechanism relying on existing segment data not changing).
|
||||
# see issue #1867.
|
||||
repository.commit()
|
||||
|
||||
def do_debug_info(self, args):
|
||||
"""display system information for debugging / bug reports"""
|
||||
|
|
Loading…
Reference in a new issue