Skip to content

Commit 9a9fb2c

Browse files
authored
port 882b12c over
ports: espressif@882b12c
1 parent 41e392f commit 9a9fb2c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

libraries/FS/src/vfs_api.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,11 @@ bool VFSImpl::rmdir(const char *path)
184184
return false;
185185
}
186186

187+
if (strcmp(_mountpoint, "/spiffs") == 0) {
188+
log_e("rmdir is unnecessary in SPIFFS");
189+
return false;
190+
}
191+
187192
VFSFileImpl f(this, path, "r");
188193
if(!f || !f.isDirectory()) {
189194
if(f) {
@@ -200,7 +205,7 @@ bool VFSImpl::rmdir(const char *path)
200205
return false;
201206
}
202207
sprintf(temp,"%s%s", _mountpoint, path);
203-
auto rc = unlink(temp);
208+
auto rc = ::rmdir(temp);
204209
free(temp);
205210
return rc == 0;
206211
}

0 commit comments

Comments
 (0)