summaryrefslogtreecommitdiff
path: root/local-fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'local-fetch.c')
-rw-r--r--local-fetch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/local-fetch.c b/local-fetch.c
index 4bf86fb..b6ec170 100644
--- a/local-fetch.c
+++ b/local-fetch.c
@@ -43,8 +43,8 @@ static int setup_indices(void)
return -1;
while ((de = readdir(dir)) != NULL) {
int namelen = strlen(de->d_name);
- if (namelen != 50 ||
- strcmp(de->d_name + namelen - 5, ".pack"))
+ if (namelen != 50 ||
+ !has_extension(de->d_name, namelen, ".pack"))
continue;
get_sha1_hex(de->d_name + 5, sha1);
setup_index(sha1);