Function make_unique

Source
pub fn make_unique(name: &str, taken: &mut BTreeSet<String>) -> String
Expand description

Makes a name unique among those already taken, and records it.

Shortening and character replacement can both map two different names onto one — Vol. 1: Live and Vol. 1? Live both become Vol. 1_ Live — and a copy that silently merges two albums into one folder is worse than a copy that refuses. A counter is appended, before the extension, so the file stays playable.