1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-02 10:53:01 +02:00

Apply idle/alarm checks to SPIFFS files too

This commit is contained in:
Mitch Bradley
2020-10-06 14:10:11 -10:00
parent b7424a6c10
commit 448e3339d1

View File

@@ -289,6 +289,10 @@ namespace WebUI {
}
static Error runLocalFile(char* parameter, AuthenticationLevel auth_level) { // ESP700
if (sys.state != State::Idle) {
webPrintln("Busy");
return Error::IdleError;
}
String path = trim(parameter);
if ((path.length() > 0) && (path[0] != '/')) {
path = "/" + path;
@@ -322,6 +326,9 @@ namespace WebUI {
}
static Error showLocalFile(char* parameter, AuthenticationLevel auth_level) { // ESP701
if (sys.state != State::Idle && sys.state != State::Alarm) {
return Error::IdleError;
}
String path = trim(parameter);
if ((path.length() > 0) && (path[0] != '/')) {
path = "/" + path;