- /* For each regular file, we must check to see if the file is in
- * the lookup table already; if it is, we increment its refcnt;
- * otherwise, we create a new lookup table entry and insert it.
- * */
-
- ret = sha1sum(path, hash);
- if (ret)
- return ret;
-
- lte = __lookup_resource(lookup_table, hash);
- if (lte) {
- lte->refcnt++;
- DEBUG("Add lte reference %u for `%s'", lte->refcnt,
- path);
- } else {
- char *file_on_disk = STRDUP(path);
- if (!file_on_disk) {
- ERROR("Failed to allocate memory for file path");