diff --git a/source/fatdir.c b/source/fatdir.c index fe0e781..435d85b 100644 --- a/source/fatdir.c +++ b/source/fatdir.c @@ -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);