From 2000d0276875dcb4c9ff63678559ab8b04dceacc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Kristan?= Date: Mon, 24 Oct 2022 18:49:02 +0200 Subject: [PATCH] Strings in flash --- wled00/wled_server.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wled00/wled_server.cpp b/wled00/wled_server.cpp index 71040093a..e9561aec0 100644 --- a/wled00/wled_server.cpp +++ b/wled00/wled_server.cpp @@ -39,20 +39,20 @@ void handleUpload(AsyncWebServerRequest *request, const String& filename, size_t if (!index) { String finalname = filename; if (finalname.charAt(0) != '/') { - finalname = "/" + finalname; // prepend slash if missing + finalname = '/' + finalname; // prepend slash if missing } request->_tempFile = WLED_FS.open(finalname, "w"); - DEBUG_PRINT("Uploading "); + DEBUG_PRINT(F("Uploading ")); DEBUG_PRINTLN(finalname); - if (finalname.equals("/presets.json") >= 0) presetsModifiedTime = toki.second(); + if (finalname.equals(F("/presets.json")) >= 0) presetsModifiedTime = toki.second(); } if (len) { request->_tempFile.write(data,len); } if (final) { request->_tempFile.close(); - if (filename.indexOf("cfg.json") >= 0) { // check for filename with or without slash + if (filename.indexOf(F("cfg.json")) >= 0) { // check for filename with or without slash doReboot = true; request->send(200, "text/plain", F("Configuration restore successful.\nRebooting...")); } else