mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #18536 from fabian18/bugfix_gcoap_fileserver_recursive_delete
gcoap_fileserver: bugfix recursive delete
This commit is contained in:
commit
0e2eb919a4
@ -480,7 +480,7 @@ static ssize_t _delete_directory(coap_pkt_t *pdu, uint8_t *buf, size_t len,
|
||||
if ((err = vfs_unlink_recursive(request->namebuf,
|
||||
request->namebuf,
|
||||
sizeof(request->namebuf))) < 0) {
|
||||
gcoap_fileserver_error_handler(pdu, buf, len, err);
|
||||
return gcoap_fileserver_error_handler(pdu, buf, len, err);
|
||||
}
|
||||
}
|
||||
gcoap_resp_init(pdu, buf, len, COAP_CODE_DELETED);
|
||||
|
@ -245,7 +245,7 @@ int vfs_unlink_recursive(const char *root, char *path_buf, size_t max_size)
|
||||
return err;
|
||||
}
|
||||
while (vfs_readdir(&dir, &entry) > 0) {
|
||||
if (!strcmp(entry.d_name, "..")) {
|
||||
if (!strcmp(entry.d_name, ".") || !strcmp(entry.d_name, "..")) {
|
||||
continue;
|
||||
}
|
||||
seg_len = strlen(entry.d_name);
|
||||
|
Loading…
Reference in New Issue
Block a user