git_vector packs;
struct pack_file *last_found;
char *pack_folder;
- size_t pack_folder_size;
+ time_t pack_folder_mtime;
size_t window_size; /* needs default value */
if (gitfo_stat(backend->pack_folder, &st) < 0 || !S_ISDIR(st.st_mode))
return GIT_ENOTFOUND;
- if ((size_t)st.st_size != backend->pack_folder_size) {
+ if (st.st_mtime != backend->pack_folder_mtime) {
char path[GIT_PATH_MAX];
strcpy(path, backend->pack_folder);
return error;
git_vector_sort(&backend->packs);
- backend->pack_folder_size = (size_t)st.st_size;
+ backend->pack_folder_mtime = st.st_mtime;
}
return GIT_SUCCESS;
git__joinpath(path, objects_dir, "pack");
if (gitfo_isdir(path) == GIT_SUCCESS) {
backend->pack_folder = git__strdup(path);
- backend->pack_folder_size = 0;
+ backend->pack_folder_mtime = 0;
if (backend->pack_folder == NULL) {
free(backend);