I'm not sure if it's a bug, looks like it but want to verify that I'm not rushing to conclusions:
|
let dir_entry = match dir_entry { |
|
Ok(entry) => { |
|
// we are opening an existing file |
|
Some(entry) |
|
} |
|
Err(_) |
|
if (mode == Mode::ReadWriteCreate) |
|
| (mode == Mode::ReadWriteCreateOrTruncate) |
|
| (mode == Mode::ReadWriteCreateOrAppend) => |
|
{ |
|
// We are opening a non-existant file, but that's OK because they |
|
// asked us to create it |
|
None |
|
} |
|
_ => { |
|
// We are opening a non-existant file, and that's not OK. |
|
return Err(Error::NotFound); |
|
} |
|
}; |
in open_file_in_dir any error, including technical SDCard errors seem to be treated as NotFound rather than separating between NotFound and other errors.
Is that indeed the case or maybe I'm missing something?
I also saw that on other functions but this seems to be with potentially the most severe consequences.
I'm not sure if it's a bug, looks like it but want to verify that I'm not rushing to conclusions:
embedded-sdmmc-rs/src/volume_mgr.rs
Lines 578 to 596 in 5fed8e0
in
open_file_in_dirany error, including technical SDCard errors seem to be treated as NotFound rather than separating between NotFound and other errors.Is that indeed the case or maybe I'm missing something?
I also saw that on other functions but this seems to be with potentially the most severe consequences.