Folder list in collect lib duplicates parent directories
The current git version (1c3fc1138f05b743ccc2) of the collection lib has two new bugs wrt. the folder tree:
1. If the database contains both
/foo/a as folders, the latter is shown twice: Once without any children and once as a parent of the former. The problem seems to be an off-by-one error in the calculation of `common_length` in collect.c, that ignores the last component in the path.
2. Even if this is fixed, the presence of
/foo/a-bar in the database again leads to duplication of
/foo/a. In this case, the problem is that the reverse lexicographic order of those tree pathnames is
[/foo/a/b, /foo/a-bar, /foo/a] and thus the O(n) algorithm that only remembers the last entry doesn't detect that
/foo/a is already in the tree.
#2 Updated by Tobias Ellinghaus over 1 year ago
- % Done changed from 0 to 100
- Status changed from New to Fixed
Applied in changeset darktable|78c9347806d00b4fffe7ffcf95cd892922a812d1.