}
// Refresh Interval
- r = pakfire_string_format_interval(refresh, repo->appdata->refresh);
- if (r < 0)
- goto ERROR;
+ if (repo->appdata->refresh >= 0) {
+ r = pakfire_string_format_interval(refresh, repo->appdata->refresh);
+ if (r < 0)
+ goto ERROR;
- // Set the refresh interval
- r = pakfire_config_set(config, section, "refresh", refresh);
- if (r < 0) {
- ERROR(repo->ctx, "Could not set refresh interval: %s\n", strerror(-r));
- goto ERROR;
+ // Set the refresh interval
+ r = pakfire_config_set(config, section, "refresh", refresh);
+ if (r < 0) {
+ ERROR(repo->ctx, "Could not set refresh interval: %s\n", strerror(-r));
+ goto ERROR;
+ }
}
// Mirror List