Skip to content
Snippets Groups Projects
Verified Commit 06bab2aa authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Fix Redox fchdir

parent 27d97f6f
No related branches found
No related tags found
No related merge requests found
...@@ -283,11 +283,12 @@ impl Pal for Sys { ...@@ -283,11 +283,12 @@ impl Pal for Sys {
} }
fn fchdir(fd: c_int) -> c_int { fn fchdir(fd: c_int) -> c_int {
let path: &mut [u8] = &mut [0; 4096]; let mut buf = [0; 4096];
if e(syscall::fpath(fd as usize, path)) == !0 { let res = e(syscall::fpath(fd as usize, &mut buf));
if res == !0 {
!0 !0
} else { } else {
e(syscall::chdir(path)) as c_int e(syscall::chdir(&buf[..res])) as c_int
} }
} }
......
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