Fix broken --progress for double-cell paths

This commit is contained in:
Marian Beermann 2016-09-25 15:37:50 +02:00
parent 895deccb06
commit 8164524d99
1 changed files with 2 additions and 1 deletions

View File

@ -95,7 +95,8 @@ class Statistics:
if space >= 8:
if space < swidth('...') + swidth(path):
path = '%s...%s' % (path[:(space // 2) - swidth('...')], path[-space // 2:])
msg += "{0:<{space}}".format(path, space=space)
space -= swidth(path)
msg += path + ' ' * space
else:
msg = ' ' * columns
print(msg, file=stream or sys.stderr, end="\r", flush=True)