From d72dcb0384f6c24ad0e141626d4ba4c2d94d67a2 Mon Sep 17 00:00:00 2001 From: Michael Chisholm Date: Thu, 11 Sep 2008 08:54:23 +0000 Subject: [PATCH] Fixed unlink not freeing cluster chains --- source/fatdir.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/fatdir.c b/source/fatdir.c index c27f6e1..6e3a88b 100644 --- a/source/fatdir.c +++ b/source/fatdir.c @@ -46,6 +46,9 @@ 2007-10-25 - Chishm * Use CLUSTER_ERROR when an error occurs with the FAT, not CLUSTER_FREE * Added statvfs functionality + + 2008-09-11 - Chishm + * Fixed unlink not freeing cluster chains -- discovered by rodries */ #include @@ -169,7 +172,7 @@ int _FAT_unlink_r (struct _reent *r, const char *path) { } } - if (!_FAT_fat_isValidCluster(partition, cluster)) { + if (_FAT_fat_isValidCluster(partition, cluster)) { // Remove the cluster chain for this file if (!_FAT_fat_clearLinks (partition, cluster)) { r->_errno = EIO;