[Fontconfig] Cache and FAT

Mikhail Gusarov dottedmag at dottedmag.net
Sun Dec 6 16:34:41 PST 2009


I've recently stumbled upon problem with FAT filesystem updated by
Windowoze (SD card in my case) and fontconfig cache. Problem boils down
to the Windows not updating mtime of directory when file is added or
removed from directory, so fontconfig does not rebuild cache as it
checks only mtime and size of directory.

I'd like to fix this problem and submit patch upstream, but first I'd
like to ask for a correct way to fix it.

Ideas came to my mind so far are:

1) scan directory and subdirectories and use max(mtimes, ctimes) of all
   files as mtime of directory.

2) add "hash" field to directory cache which is hash of all
   subdirectories' hashes and directory contents.

Also this check should be conditional to avoid any overhead on more
conventional filesystems. is it a good idea to add boolean attribute for
<dir> entry in config?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20091207/b20c3891/attachment.pgp 

More information about the Fontconfig mailing list