mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-31 03:07:16 +02:00
@ -184,6 +184,11 @@ bool VFSImpl::rmdir(const char *path)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strcmp(_mountpoint, "/spiffs") == 0) {
|
||||||
|
log_e("rmdir is unnecessary in SPIFFS");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
VFSFileImpl f(this, path, "r");
|
VFSFileImpl f(this, path, "r");
|
||||||
if(!f || !f.isDirectory()) {
|
if(!f || !f.isDirectory()) {
|
||||||
if(f) {
|
if(f) {
|
||||||
@ -200,7 +205,7 @@ bool VFSImpl::rmdir(const char *path)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
sprintf(temp,"%s%s", _mountpoint, path);
|
sprintf(temp,"%s%s", _mountpoint, path);
|
||||||
auto rc = unlink(temp);
|
auto rc = ::rmdir(temp);
|
||||||
free(temp);
|
free(temp);
|
||||||
return rc == 0;
|
return rc == 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user