SPIFFS File object evaluates as true even if the file could not be opened.
This commit is contained in:
M. Betz 2020-09-30 05:24:59 -07:00 committed by GitHub
parent d56267bd8c
commit fa8a1c38d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,7 +113,7 @@ public:
} }
File f = _fs.open(path, "r"); File f = _fs.open(path, "r");
if (!f) if (!f || !f.available())
return false; return false;
if (_cache_header.length() != 0) if (_cache_header.length() != 0)