From 92329a8dd0b586bccaa5c55ef5b0ce18a12cc94a Mon Sep 17 00:00:00 2001 From: ahadcove Date: Mon, 24 Oct 2022 11:34:56 -0400 Subject: [PATCH] chore: condense the if statement --- wled00/wled_server.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wled00/wled_server.cpp b/wled00/wled_server.cpp index 4c235cf3..a5301c1a 100644 --- a/wled00/wled_server.cpp +++ b/wled00/wled_server.cpp @@ -45,14 +45,14 @@ void handleUpload(AsyncWebServerRequest *request, const String& filename, size_t request->_tempFile = WLED_FS.open(finalname, "w"); DEBUG_PRINT("Uploading "); DEBUG_PRINTLN(finalname); - if (finalname == "/presets.json") presetsModifiedTime = toki.second(); + if (finalname.indexOf("presets.json") >= 0) presetsModifiedTime = toki.second(); } if (len) { request->_tempFile.write(data,len); } if (final) { request->_tempFile.close(); - if (filename == "/cfg.json" || filename == "cfg.json") { + if (filename.indexOf("cfg.json") >= 0) { doReboot = true; request->send(200, "text/plain", F("Configuration restore successful.\nRebooting...")); } else