Skip to content
Snippets Groups Projects
Commit 7cf68bc8 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Merge branch 'fix_fpath' into 'master'

Fix double slashes in fpath.

See merge request redox-os/relibc!469
parents 84c0f502 c53c38bc
No related branches found
No related tags found
No related merge requests found
...@@ -840,8 +840,13 @@ impl Pal for Sys { ...@@ -840,8 +840,13 @@ impl Pal for Sys {
let mut cursor = io::Cursor::new(out); let mut cursor = io::Cursor::new(out);
let res = match scheme.as_ref() { let res = match scheme.as_ref() {
"file" => write!(cursor, "/{}", reference.as_ref()), "file" => write!(cursor, "/{}", reference.as_ref().trim_start_matches('/')),
_ => write!(cursor, "/scheme/{}/{}", scheme.as_ref(), reference.as_ref()), _ => write!(
cursor,
"/scheme/{}/{}",
scheme.as_ref(),
reference.as_ref().trim_start_matches('/')
),
}; };
match res { match res {
Ok(()) => cursor.position() as ssize_t, Ok(()) => cursor.position() as ssize_t,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment