diff --git a/esp3d/src/modules/http/handlers/handle-SD-files.cpp b/esp3d/src/modules/http/handlers/handle-SD-files.cpp index f3409b1f..7c09910e 100644 --- a/esp3d/src/modules/http/handlers/handle-SD-files.cpp +++ b/esp3d/src/modules/http/handlers/handle-SD-files.cpp @@ -100,7 +100,7 @@ void HTTP_Server::handleSDFileList() { status = shortname + " deleted"; // what happen if no "/." and no other subfiles for SPIFFS like? String ptmp = path; - if ((path != "/") && (path[path.length() - 1] = '/')) { + if ((path != "/") && (path[path.length() - 1] == '/')) { ptmp = path.substring(0, path.length() - 1); } if (!ESP_SD::exists(ptmp.c_str())) { @@ -160,7 +160,7 @@ void HTTP_Server::handleSDFileList() { buffer2send.reserve(1200); buffer2send = "{\"files\":["; String ptmp = path; - if ((path != "/") && (path[path.length() - 1] = '/')) { + if ((path != "/") && (path[path.length() - 1] == '/')) { ptmp = path.substring(0, path.length() - 1); } _webserver->setContentLength(CONTENT_LENGTH_UNKNOWN); diff --git a/esp3d/src/modules/http/handlers/handle-files.cpp b/esp3d/src/modules/http/handlers/handle-files.cpp index 9505a715..234eb00c 100644 --- a/esp3d/src/modules/http/handlers/handle-files.cpp +++ b/esp3d/src/modules/http/handlers/handle-files.cpp @@ -88,7 +88,7 @@ void HTTP_Server::handleFSFileList() { status = shortname + " deleted"; // what happen if no "/." and no other subfiles for SPIFFS like? String ptmp = path; - if ((path != "/") && (path[path.length() - 1] = '/')) { + if ((path != "/") && (path[path.length() - 1] == '/')) { ptmp = path.substring(0, path.length() - 1); } if (!ESP_FileSystem::exists(ptmp.c_str())) { @@ -144,7 +144,7 @@ void HTTP_Server::handleFSFileList() { buffer2send.reserve(1200); buffer2send = "{\"files\":["; String ptmp = path; - if ((path != "/") && (path[path.length() - 1] = '/')) { + if ((path != "/") && (path[path.length() - 1] == '/')) { ptmp = path.substring(0, path.length() - 1); } _webserver->setContentLength(CONTENT_LENGTH_UNKNOWN);