diff --git a/src/platform/redox/path.rs b/src/platform/redox/path.rs index 1fa46a3d22..921cd52a66 100644 --- a/src/platform/redox/path.rs +++ b/src/platform/redox/path.rs @@ -93,7 +93,7 @@ pub fn chdir(path: &str) -> Result<()> { let mut cwd_guard = CWD.write(); let (is_relative, path) = normalize_path(path).ok_or(Error::new(ENOENT))?; if is_relative { - let fd = current_dir()? + let fd = cwd_guard .as_ref() .unwrap() .fd