don't fail hard if 'objects/pack' directory does not exist in repo
diff --git a/lib/repository.c b/lib/repository.c
index 20596a1..04a5cf5 100644
--- a/lib/repository.c
+++ b/lib/repository.c
@@ -653,7 +653,10 @@ got_repo_search_packidx(struct got_packidx **packidx, int *idx,
packdir = opendir(path_packdir);
if (packdir == NULL) {
- err = got_error_from_errno2("opendir", path_packdir);
+ if (errno == ENOENT)
+ err = got_error_no_obj(id);
+ else
+ err = got_error_from_errno2("opendir", path_packdir);
goto done;
}