diff --git a/parser/parser_main.c b/parser/parser_main.c index 442bd951a..b77ee2a5b 100644 --- a/parser/parser_main.c +++ b/parser/parser_main.c @@ -1272,7 +1272,7 @@ static int create_cache(const char *cachedir, const char *path, struct stat stat_file; FILE * f = NULL; - if (cond_clear_cache && clear_cache_files(cacheloc) != 0) + if (clear_cache_files(cacheloc) != 0) goto error; create_file: @@ -1347,7 +1347,7 @@ static void setup_flags(void) get_flags_string(&cache_flags, cache_features_path); if (cache_flags) { if (strcmp(flags_string, cache_flags) != 0) { - if (write_cache) { + if (write_cache && cond_clear_cache) { if (create_cache(cacheloc, cache_features_path, flags_string)) skip_read_cache = 1;