Update file.cpp

small optimization, based on upstream 0593a078c6  by willmmiles
This commit is contained in:
Frank
2024-04-29 16:11:12 +02:00
parent f7504dcc36
commit b2646a8489

View File

@@ -512,8 +512,8 @@ bool handleFileRead(AsyncWebServerRequest* request, String path){
}
#endif
if(WLED_FS.exists(path)) {
request->send(WLED_FS, path, contentType);
if(WLED_FS.exists(path) || WLED_FS.exists(path + ".gz")) {
request->send(WLED_FS, path, String(), request->hasArg(F("download")));
return true;
}
//USER_PRINTLN("WS FileRead failed: " + path + " (" + contentType + ")");