From 2e895ac2f33d9c5896027d4d4a11094a99f277ef Mon Sep 17 00:00:00 2001 From: Julian Hofer Date: Fri, 12 Jul 2019 17:35:45 +0200 Subject: [PATCH] Fix borg diff --- src/vorta/views/diff_result.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/vorta/views/diff_result.py b/src/vorta/views/diff_result.py index bb2d3a9d..ecc5bf61 100644 --- a/src/vorta/views/diff_result.py +++ b/src/vorta/views/diff_result.py @@ -60,24 +60,24 @@ class DiffResult(DiffResultBase, DiffResultUI): full_path = line[line.find(line_splitted[3]):] elif change_type == "modified": full_path = line[line.find(line_splitted[4]):] + + dir, name = os.path.split(full_path) + # add to nested dict of folders to find nested dirs. + d = get_dict_from_list(nested_file_list, dir.split('/')) + if name not in d: + d[name] = {} else: size = 0 full_path = line[line.find(line_splitted[2]):] - dir, name = os.path.split(full_path) - - # add to nested dict of folders to find nested dirs. - d = get_dict_from_list(nested_file_list, dir.split('/')) - if name not in d: - d[name] = {} + dir, name = os.path.split(full_path) + # add to nested dict of folders to find nested dirs. + d = get_dict_from_list(nested_file_list, full_path.split('/')) return size, change_type, name, dir for l in fs_data.split('\n'): - try: - files_with_attributes.append(parse_line(l)) - except ValueError: - pass + files_with_attributes.append(parse_line(l)) model = TreeModel()