(tree, path)
| 53 | |
| 54 | |
| 55 | def add_path_to_tree(tree, path): |
| 56 | parts = path.split(os.sep) |
| 57 | current_level = tree |
| 58 | for part in parts: |
| 59 | if part not in current_level: |
| 60 | current_level[part] = {} |
| 61 | current_level = current_level[part] |
| 62 | |
| 63 | |
| 64 | def build_tree(paths): |