mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-26 01:37:20 +00:00
Merge pull request #6544 from ThomasWaldmann/fix-progress-archivename-master
escape % chars in archive name, fixes #6500
This commit is contained in:
commit
1e213e93a3
1 changed files with 3 additions and 1 deletions
|
@ -670,8 +670,10 @@ def add(id):
|
||||||
archive_index = ChunkIndex()
|
archive_index = ChunkIndex()
|
||||||
sync = CacheSynchronizer(archive_index)
|
sync = CacheSynchronizer(archive_index)
|
||||||
add(self.id)
|
add(self.id)
|
||||||
|
# we must escape any % char in the archive name, because we use it in a format string, see #6500
|
||||||
|
arch_name_escd = self.name.replace('%', '%%')
|
||||||
pi = ProgressIndicatorPercent(total=len(self.metadata.items),
|
pi = ProgressIndicatorPercent(total=len(self.metadata.items),
|
||||||
msg='Calculating statistics for archive %s ... %%3d%%%%' % self.name,
|
msg='Calculating statistics for archive %s ... %%3.0f%%%%' % arch_name_escd,
|
||||||
msgid='archive.calc_stats')
|
msgid='archive.calc_stats')
|
||||||
for id, chunk in zip(self.metadata.items, self.repository.get_many(self.metadata.items)):
|
for id, chunk in zip(self.metadata.items, self.repository.get_many(self.metadata.items)):
|
||||||
pi.show(increase=1)
|
pi.show(increase=1)
|
||||||
|
|
Loading…
Reference in a new issue