Просмотр исходного кода

geode: Return GeodeFileNotFound if file is not found.

parazyd 3 лет назад
Родитель
Сommit
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,
             Err(e) => match e {
                 // 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
                 _ => return Err(Error::GeodeNeedsGc),
             },