summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorHardeep Sidhu <dyp@pobox.com>2006-05-16 06:53:41 +0000
committerHardeep Sidhu <dyp@pobox.com>2006-05-16 06:53:41 +0000
commit2436dbabe7a0535c90323434e607f8de85173fc3 (patch)
tree33fcc8e4ac8396ff0be1148799b0324e6d6420b0 /firmware
parentca916145f914d5eb0ff23afc81c28649c44de1a5 (diff)
downloadrockbox-2436dbabe7a0535c90323434e607f8de85173fc3.tar.gz
rockbox-2436dbabe7a0535c90323434e607f8de85173fc3.tar.bz2
rockbox-2436dbabe7a0535c90323434e607f8de85173fc3.zip
Update dircache startcluster at file close when writing. Fixes bug when creating small files (dircache startcluster remains 0 because fat write doesn't occur until close).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9950 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/common/file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/common/file.c b/firmware/common/file.c
index 464d10ffc6..e24b44ce1f 100644
--- a/firmware/common/file.c
+++ b/firmware/common/file.c
@@ -249,6 +249,9 @@ int close(int fd)
rc = fsync(fd);
if (rc < 0)
return rc * 10 - 3;
+#ifdef HAVE_DIRCACHE
+ dircache_update_filesize(fd, file->size, file->fatfile.firstcluster);
+#endif
}
file->busy = false;