The source project of this merge request has been removed.
file-utilities: rework common prefix computation
Currently, the process for getting the common prefix of a list of file names is a tad too greedy:
- Find the common prefix of all the strings.
- Strip the extension from the prefix.
- Strip trailing punctuation.
Step 2 may strip dots if there’s trailing whitespace and step 3 may strip useful punctuation (e.g. parentheses). This commit reworks the process as such:
- Strip the extension from all the file names.
- Find the common prefix of all the strings.
- Trim trailing whitespace.
Fixes #174 (closed).
Edited by Ghost User