mirror of https://github.com/borgbase/vorta
Improve checks for +/- in diff line (#359)
There could exist a scenario when a +/- would be not at the start of the string. Current code would fail in this case. Instead we should check that the first character of the string is +/-. This following on from PR # 356 https://github.com/borgbase/vorta/pull/356
This commit is contained in:
parent
bf7185c5f2
commit
af7cc3dd2b
|
@ -43,7 +43,7 @@ class DiffResult(DiffResultBase, DiffResultUI):
|
|||
size = line_split[0]
|
||||
unit = line_split[1]
|
||||
# If present remove '+' or '-' sign at the front
|
||||
if '+' in size or '-' in size:
|
||||
if size[0] in ('+', '-'):
|
||||
size = size[1:]
|
||||
|
||||
if line_split[0].startswith("["):
|
||||
|
|
Loading…
Reference in New Issue