pacenotes_installer/relative_path.rs
1/// Joins a `/`-separated relative path segment by segment, so the platform
2/// never re-parses the string as a path of its own.
3pub fn join(base: &std::path::Path, relative: &str) -> std::path::PathBuf {
4 let mut path = base.to_path_buf();
5 for segment in relative.split('/') {
6 path.push(segment);
7 }
8 path
9}