Hi, comparing inode numbers is not enough, inode numbers are only unique on a certain mount. therefore compare mount identifiers as well, and only if both match consider it a match. 2006-01-11 Dirk Mueller <dmueller@xxxxxxxx> * src/fccfg.c (FcConfigNormalizeFontDir): Compare stat.r_dev as well.
--- src/fccfg.c +++ src/fccfg.c @@ -394,18 +394,20 @@ { /* If this is a bottleneck, we can cache the fontDir inodes. */ ino_t di; + dev_t ri; int n; struct stat s; if (stat ((char *)d, &s) == -1) return 0; di = s.st_ino; + ri = s.st_rdev; for (n = 0; n < config->fontDirs->num; n++) { if (stat ((char *)config->fontDirs->strs[n], &s) == -1) continue; - if (di == s.st_ino) + if (di == s.st_ino && ri == s.st_rdev) return config->fontDirs->strs[n]; } return 0;
_______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/fontconfig