out = __out;
- /* do not write lookup table entries for empty files */
- if (lte->output_resource_entry.original_size == 0)
- return 0;
-
/* Don't write entries that have not had file resources or metadata
* resources written for them. */
if (lte->out_refcnt == 0)
struct lookup_table_entry *lte;
u8 hash[SHA1_HASH_SIZE];
+ /* Empty files do not have to have a lookup table entry. */
+ if (root_stbuf.st_size == 0)
+ goto out;
+
/* 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.
}
root->lte = lte;
}
+out:
*root_ret = root;
return ret;
}