[Fontconfig] Cache and FAT

Mikhail Gusarov dottedmag at dottedmag.net
Wed Mar 3 17:34:12 PST 2010


Twas brillig at 17:31:12 03.03.2010 UTC-05 when behdad at behdad.org did gyre and gimble:

 BE> Did you see the comment I left on the bug last week?
 BE> http://bugs.freedesktop.org/show_bug.cgi?id=25535

Ah, no, missed it.  As it is a discussion item, let's discuss here.

"This changes the cache format on FAT filesystems.  Not a huge deal, but
I'd rather you just emulate correct mtime instead of using a hash.  That
would require stating all the files in the directory and taking the max
mtime I guess?"

Nope. Imagine the following directory:

foo/
 a.txt (mtime 12345)
 b.txt (mtime 6789)

Adding file c.txt with mtime 4444 will not change max(mtime). Deleting
file b.txt will not change max(mtime). Windows does not change mtime
while copying or moving files.

I gave it a thought before writing a patch - directory mtime changes
every time contents of directory changes, so the only substitute for
mtime if it is not available is a checksum of directory contents, it
can't be reliable emulated by just looking at files inside.

-- 
  http://fossarchy.blogspot.com/
-------------- 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/20100304/481d1c9a/attachment.pgp>


More information about the Fontconfig mailing list