Skip to content

Commit

Permalink
Fasmifra: do not load indexed fragments from cache if -f
Browse files Browse the repository at this point in the history
-f means the user wants to overwrite/refresh the indexed fragments cache
  • Loading branch information
UnixJunkie committed Aug 20, 2021
1 parent f5eeeca commit aa6af97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fasmifra.ml
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,9 @@ let cache_indexed_fragments force frags_fn seed_frags_frags_ht_pair =
else
Log.warn "cache file already exists (use -f to overwrite): %s" cache_fn

let load_indexed_fragments frags_fn =
let load_indexed_fragments force frags_fn =
let cache_fn = frags_fn ^ ".bin_cache" in
if Sys.file_exists cache_fn then
if (not force) && Sys.file_exists cache_fn then
let () = Log.info "reading indexed fragments from cache: %s" cache_fn in
restore cache_fn
else
Expand Down Expand Up @@ -438,7 +438,7 @@ let main () =
CLI.finalize (); (* ------------ CLI parsing ---------------- *)
Log.info "indexing fragments";
let seed_fragments, frags_ht =
let res = load_indexed_fragments input_frags_fn in
let res = load_indexed_fragments force input_frags_fn in
cache_indexed_fragments force input_frags_fn res;
res in
Log.info "seed_frags: %d; attach_types: %d"
Expand Down

0 comments on commit aa6af97

Please sign in to comment.