Skip to content

Commit fa8a1c3

Browse files
authored
SPIFFS File object evaluates as true even if the file could not be opened.
1 parent d56267b commit fa8a1c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libraries/WebServer/src/detail/RequestHandlersImpl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class StaticRequestHandler : public RequestHandler {
113113
}
114114

115115
File f = _fs.open(path, "r");
116-
if (!f)
116+
if (!f || !f.available())
117117
return false;
118118

119119
if (_cache_header.length() != 0)

0 commit comments

Comments
 (0)