mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-18 19:28:02 -04:00
Preserve File error state once error occurs.
This commit is contained in:
parent
0f1ae96ba4
commit
b21758781c
2 changed files with 35 additions and 11 deletions
|
@ -126,7 +126,7 @@ public:
|
|||
~File();
|
||||
|
||||
bool is_open() const {
|
||||
return f_error(&f) == 0;
|
||||
return err == FR_OK;
|
||||
}
|
||||
|
||||
bool read(void* const data, const size_t bytes_to_read);
|
||||
|
@ -145,6 +145,7 @@ public:
|
|||
|
||||
private:
|
||||
FIL f;
|
||||
uint32_t err;
|
||||
};
|
||||
|
||||
inline constexpr File::openmode operator|(File::openmode a, File::openmode b) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue