mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-22 01:49:17 +01:00
Set errno to ENOTEMPTY when removing a non-empty directory
The value that was previously set, EPERM, implies that the user didn't have the (write) permission to remove the directory.
This commit is contained in:
parent
d59c7c8b35
commit
3fde6ce161
@ -136,7 +136,7 @@ int _FAT_unlink_r (struct _reent *r, const char *path) {
|
||||
if (!_FAT_directory_isDot (&dirContents)) {
|
||||
// The directory had something in it that isn't a reference to itself or it's parent
|
||||
_FAT_unlock(&partition->lock);
|
||||
r->_errno = EPERM;
|
||||
r->_errno = ENOTEMPTY;
|
||||
return -1;
|
||||
}
|
||||
nextEntry = _FAT_directory_getNextEntry (partition, &dirContents);
|
||||
|
Loading…
Reference in New Issue
Block a user