mirror of
https://github.com/luc-github/ESP3D.git
synced 2026-02-20 01:11:19 +01:00
Add sanity check in case no path
This commit is contained in:
@@ -75,7 +75,9 @@ void HTTP_Server::handleSDFileList() {
|
||||
|
||||
// get current path
|
||||
if (_webserver->hasArg("path")) {
|
||||
path += _webserver->arg("path");
|
||||
path = _webserver->arg("path");
|
||||
} else {
|
||||
path = "/";
|
||||
}
|
||||
// to have a clean path
|
||||
path.trim();
|
||||
|
||||
@@ -63,7 +63,9 @@ void HTTP_Server::handleFSFileList() {
|
||||
}
|
||||
// get current path
|
||||
if (_webserver->hasArg("path")) {
|
||||
path += _webserver->arg("path");
|
||||
path = _webserver->arg("path");
|
||||
} else {
|
||||
path = "/";
|
||||
}
|
||||
// to have a clean path
|
||||
path.trim();
|
||||
|
||||
Reference in New Issue
Block a user