Преглед изворни кода

geode: Return GeodeFileNotFound if file is not found.

parazyd пре 3 година
родитељ
комит
37929b8545
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      src/geode/mod.rs

+ 3 - 1
src/geode/mod.rs

@@ -360,7 +360,9 @@ impl Geode {
             Ok(v) => v,
             Ok(v) => v,
             Err(e) => match e {
             Err(e) => match e {
                 // If the file is not found, return according error.
                 // If the file is not found, return according error.
-                Error::Io(err) if err == std::io::ErrorKind::NotFound => return Err(e),
+                Error::Io(err) if err == std::io::ErrorKind::NotFound => {
+                    return Err(Error::GeodeFileNotFound)
+                }
                 // Anything else should tell the client to do garbage collection
                 // Anything else should tell the client to do garbage collection
                 _ => return Err(Error::GeodeNeedsGc),
                 _ => return Err(Error::GeodeNeedsGc),
             },
             },