summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-01-15 14:34:54 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-01-15 14:34:54 +0000
commitce1c93d628280dcbbbaac7a43f43dbb81008ea03 (patch)
treef0f56291fc7167f79be97f8c79056dd443e0b7a9
parent60b1c4bbe1099980ced1f69a9a51674f6e05dd3e (diff)
downloadrockbox-ce1c93d628280dcbbbaac7a43f43dbb81008ea03.tar.gz
rockbox-ce1c93d628280dcbbbaac7a43f43dbb81008ea03.zip
First mkdir() bug killed :-)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4239 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/common/dir.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/common/dir.c b/firmware/common/dir.c
index 98adc5c730..52659085b8 100644
--- a/firmware/common/dir.c
+++ b/firmware/common/dir.c
@@ -158,9 +158,12 @@ int mkdir(char *name)
if ( !strcasecmp(basename, entry->d_name) ) {
DEBUGF("mkdir error: file exists\n");
errno = EEXIST;
+ closedir(dir);
return - 3;
}
}
+
+ closedir(dir);
rc = fat_create_dir(basename, &newdir, &(dir->fatdir));