- add new-fangled requires on "libc.so.6(GLIBC_2.1)" (sparc-linux only).
- MiNT port (Guido Flohr <gufl0000@stud.uni-sb.de>).
- fix: --rebuilddb with --root dinna remove directory (Michael Andres).
+ - fix: false fingerprint stat cache hit -- "the tetex problem".
3.0 -> 3.0.1
- fix: %verifyscript resurrected (Shing-Gene Yung).
char * match;
int pathsStripped;
int matchLength;
+ int stripLength;
dev_t dev;
ino_t ino;
};
struct lookupCache * cache) {
char dir[PATH_MAX];
const char * chptr1;
- char * end;
+ char * end, * bn;
fingerPrint fp;
struct stat sb;
char * buf;
if (*chptr1 == '/') stripCount--;
chptr1++;
}
- if (!stripCount) {
- chptr1 = fullName + cache->matchLength + 1;
+
+ chptr1 = fullName + cache->matchLength + 1;
+ if (stripCount == 0 && !(cache->stripLength > 0 &&
+ strncmp(cache->match+cache->matchLength+1, chptr1, cache->stripLength))) {
if (scareMemory)
fp.basename = chptr1;
else
buf = alloca(strlen(fullName) + 1);
strcpy(buf, fullName);
- end = strrchr(buf, '/');
+ end = bn = strrchr(buf, '/');
stripCount = 0;
while (*buf) {
*end = '\0';
fp.dev = sb.st_dev;
if (cache) {
- strcpy(cache->match, buf);
- cache->matchLength = strlen(buf);
+ strcpy(cache->match, fullName);
+ cache->match[strlen(fullName)+1] = '\0';
+ cache->matchLength = (end-buf);
+ cache->match[cache->matchLength] = '\0';
+ cache->stripLength = (bn - (end+1));
+ cache->match[bn-buf] = '\0';
cache->pathsStripped = stripCount;
cache->dev = sb.st_dev;
cache->ino = sb.st_ino;
if (j > maxLen) maxLen = j;
}
- cache.match = alloca(maxLen + 1);
+ cache.match = alloca(maxLen + 2);
*cache.match = '\0';
cache.matchLength = 0;
cache.pathsStripped = 0;
+ cache.stripLength = 0;
for (i = 0; i < numItems; i++) {
fpList[i] = doLookup(fullNames[i], 1, &cache);