diff --git a/plugins/fs/src/commands.rs b/plugins/fs/src/commands.rs index 77bdf87737..e73f0b4217 100644 --- a/plugins/fs/src/commands.rs +++ b/plugins/fs/src/commands.rs @@ -1164,7 +1164,9 @@ fn get_stat(metadata: std::fs::Metadata) -> FileInfo { fn path_from_bytes(bytes: &[u8]) -> PathBuf { #[cfg(unix)] - let path = std::ffi::OsStr::from_bytes(path_bytes); + use std::os::unix::ffi::OsStrExt; + #[cfg(unix)] + let path = std::ffi::OsStr::from_bytes(bytes); #[cfg(windows)] let path = { use std::os::windows::ffi::OsStringExt;