Fix double slashes in fpath.

This commit is contained in:
4lDO2
2024-04-02 15:10:03 +02:00
parent 84c0f5023e
commit c53c38bcae
+7 -2
View File
@@ -840,8 +840,13 @@ impl Pal for Sys {
let mut cursor = io::Cursor::new(out);
let res = match scheme.as_ref() {
"file" => write!(cursor, "/{}", reference.as_ref()),
_ => write!(cursor, "/scheme/{}/{}", scheme.as_ref(), reference.as_ref()),
"file" => write!(cursor, "/{}", reference.as_ref().trim_start_matches('/')),
_ => write!(
cursor,
"/scheme/{}/{}",
scheme.as_ref(),
reference.as_ref().trim_start_matches('/')
),
};
match res {
Ok(()) => cursor.position() as ssize_t,