Commit Graph

7 Commits

Author SHA1 Message Date
Akira TAGOH cef2b50c66 clean up
ret won't be -1 if HAVE_STRUCT_DIRENT_D_TYPE isn't defined.
2012-12-11 12:30:05 +09:00
Akira TAGOH cd280f6532 Fix a build fail on MINGW 2012-06-13 20:01:30 +09:00
Akira TAGOH 5254a6630f Fix a typo and polish the previous change 2012-05-31 13:07:29 +09:00
Akira TAGOH 4a741e9a0a Fix the build fail on Solaris
It's introduced by 0ac6c98294.
Use lstat() and S_ISDIR() to check if it's the directory or not
if there are no d_type in struct dirent.
2012-05-30 18:30:49 +09:00
Mikhail Gusarov 0ac6c98294 Fix cache aging for fonts on FAT filesystem under Linux
Windows does not update mtime of directory on FAT filesystem when
file is added to it or removed from it. Fontconfig uses mtime of
directory to check cache file aging and hence fails to detect
newly added or recently removed files.

This changeset detects FAT filesystem (currently implemented for
Linux) and adds generating checksum of directory entries instead
of using mtime which guarantees proper cache rebuild.

For non-FAT filesystems this patch adds single syscall per directory
which is negligeable overhead.

This fixes bug https://bugs.freedesktop.org/show_bug.cgi?id=25535

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2012-05-28 16:46:04 +09:00
Akira TAGOH dc2da23e69 Move statfs/statvfs wrapper to fcstat.c and add a test for the mtime broken fs
just rework to share the efforts between FcIsFsMmapSafe() and FcIsFsMtimeBroken().
2012-05-28 16:46:01 +09:00
Mikhail Gusarov 6a83c1ad40 Move FcStat to separate compilation unit
FcStat() logic is quite complicated in presence of various semi-broken operating
systems and filesystems, split it out in order to make it a bit easier.

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2012-05-28 16:01:00 +09:00