diff --git a/Cargo.toml b/Cargo.toml index 10641e3302..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] @@ -58,7 +58,6 @@ parse-size = { version = "1", optional = true } range-tree = { version = "0.1", optional = true } redox_syscall = { path = "../syscall" } seahash = { version = "4.1.0", default-features = false } -smallvec = { version = "1.15.2", optional = true } termion = { version = "4", optional = true } uuid = { version = "1.4", default-features = false } xts-mode = { version = "0.5", default-features = false } @@ -80,7 +79,6 @@ std = [ "uuid/v4", "redox_syscall/std", "redox-scheme", - "smallvec", ] [target.'cfg(not(target_os = "redox"))'.dependencies] @@ -88,7 +86,7 @@ fuser = { version = "0.16", optional = true } [target.'cfg(target_os = "redox")'.dependencies] libredox = { path = "../libredox", optional = true } -redox-path = "0.4.0" +redox-path = "0.3.0" redox-scheme = { path = "../redox-scheme", optional = true } [lints.rust] @@ -100,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 }) }