| 3193 | } |
| 3194 | |
| 3195 | static int should_delete_shared_index(const char *shared_index_path) |
| 3196 | { |
| 3197 | struct stat st; |
| 3198 | unsigned long expiration; |
| 3199 | |
| 3200 | /* Check timestamp */ |
| 3201 | expiration = get_shared_index_expire_date(); |
| 3202 | if (!expiration) |
| 3203 | return 0; |
| 3204 | if (stat(shared_index_path, &st)) |
| 3205 | return error_errno(_("could not stat '%s'"), shared_index_path); |
| 3206 | if (st.st_mtime > expiration) |
| 3207 | return 0; |
| 3208 | |
| 3209 | return 1; |
| 3210 | } |
| 3211 | |
| 3212 | static int clean_shared_index_files(const char *current_hex) |
| 3213 | { |
no test coverage detected