return NULL;
}
-static int doLookup(fingerPrintCache cache,
- const char * dirName, const char * baseName,
+static int doLookupId(fingerPrintCache cache,
+ rpmsid dirNameId, rpmsid baseNameId,
fingerPrint *fp)
{
char dir[PATH_MAX];
char *buf = NULL;
char *cdnbuf = NULL;
const struct fprintCacheEntry_s * cacheHit;
+ const char * dirName = rpmstrPoolStr(cache->pool, dirNameId);
/* XXX WATCHOUT: fp.subDir is set below from relocated dirName arg */
cleanDirName = dirName;
/* XXX don't bother saving '/' as subdir */
(subDir[0] == '/' && subDir[1] == '\0'))
subDir = NULL;
- fp->baseNameId = rpmstrPoolId(cache->pool, baseName, 1);
+ fp->baseNameId = baseNameId;
if (subDir != NULL)
fp->subDirId = rpmstrPoolId(cache->pool, subDir, 1);
goto exit;
return 0;
}
+static int doLookup(fingerPrintCache cache,
+ const char * dirName, const char * baseName,
+ fingerPrint *fp)
+{
+ rpmsid dirNameId = rpmstrPoolId(cache->pool, dirName, 1);
+ rpmsid baseNameId = rpmstrPoolId(cache->pool, baseName, 1);
+ return doLookupId(cache, dirNameId, baseNameId, fp);
+}
+
int fpLookup(fingerPrintCache cache,
const char * dirName, const char * baseName,
fingerPrint **fp)