[Fontconfig] Cache and FAT

Behdad Esfahbod behdad at behdad.org
Wed Mar 3 17:50:20 PST 2010


On 03/03/2010 08:34 PM, Mikhail Gusarov wrote:
> 
> 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.

I see.  I'll review and commit the patch as is then.

Thanks,
behdad


More information about the Fontconfig mailing list