diff --git a/Cargo.toml b/Cargo.toml index 474794f82d..ea43c12ea6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ repository = "https://gitlab.redox-os.org/redox-os/redoxfs" version = "0.9.1+rb0.2.5" license-file = "LICENSE" readme = "README.md" -authors = ["Jeremy Soller "] +authors = ["Jeremy Soller ", "vasilito "] edition = "2021" [lib] @@ -87,7 +87,7 @@ fuser = { version = "0.16", optional = true } [target.'cfg(target_os = "redox")'.dependencies] libredox = { path = "../libredox", optional = true } redox-path = "0.3.0" -redox-scheme = { version = "0.11.2", optional = true } +redox-scheme = { path = "../redox-scheme", optional = true } [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] } @@ -98,3 +98,4 @@ assert_cmd = "2.0.17" [patch.crates-io] redox_syscall = { path = "../syscall" } libredox = { path = "../libredox" } +redox-scheme = { path = "../redox-scheme" } diff --git a/src/disk/file.rs b/src/disk/file.rs index 78d51bce05..f923d72a38 100644 --- a/src/disk/file.rs +++ b/src/disk/file.rs @@ -43,10 +43,12 @@ impl ResultExt for std::io::Result { impl DiskFile { pub fn open(path: impl AsRef) -> Result { + let path = path.as_ref(); let file = OpenOptions::new() .read(true) .write(true) .open(path) + .or_else(|_| OpenOptions::new().read(true).open(path)) .or_eio()?; Ok(DiskFile { file }) }