diff --git a/src/directory/mmap_directory.rs b/src/directory/mmap_directory.rs index 11887a30a3..537eb95e37 100644 --- a/src/directory/mmap_directory.rs +++ b/src/directory/mmap_directory.rs @@ -369,7 +369,9 @@ impl Directory for MmapDirectory { fn exists(&self, path: &Path) -> Result { let full_path = self.resolve_path(path); - Ok(full_path.exists()) + full_path + .try_exists() + .map_err(|io_err| OpenReadError::wrap_io_error(io_err, path.to_path_buf())) } fn open_write(&self, path: &Path) -> Result {