mirror of
https://github.com/borgbackup/borg.git
synced 2025-03-01 01:06:59 +00:00
borg upgrade - fix README contents
This commit is contained in:
parent
8671be1ef2
commit
e9ab11be49
1 changed files with 7 additions and 0 deletions
|
@ -50,11 +50,18 @@ def upgrade(self, dryrun=True, inplace=False):
|
|||
try:
|
||||
self.convert_cache(dryrun)
|
||||
self.convert_segments(segments, dryrun=dryrun, inplace=inplace)
|
||||
self.borg_readme()
|
||||
finally:
|
||||
self.lock.release()
|
||||
self.lock = None
|
||||
return backup
|
||||
|
||||
def borg_readme(self):
|
||||
readme = os.path.join(self.path, 'README')
|
||||
os.remove(readme)
|
||||
with open(readme, 'w') as fd:
|
||||
fd.write('This is a Borg repository\n')
|
||||
|
||||
@staticmethod
|
||||
def convert_segments(segments, dryrun=True, inplace=False):
|
||||
"""convert repository segments from attic to borg
|
||||
|
|
Loading…
Reference in a new issue