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
This commit is contained in:
parent
ca916145f9
commit
2436dbabe7
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue