Skip to content

Commit

Permalink
Removing double prefixes bug in produce_or_load
Browse files Browse the repository at this point in the history
  • Loading branch information
pjgorski committed Jun 30, 2023
1 parent ab87902 commit 83fea6e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/saving_files.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,14 @@ function produce_or_load(f::Function, config, path::String = "";
"""
end
if filename === nothing
filename = config -> savename(config; kwargs...)
filename = config -> savename(prefix, config, suffix; kwargs...)
end
# Prepare absolute file name
if filename isa AbstractString
name = filename
name = append_prefix_suffix(filename, prefix, suffix)
else
name = string(filename(config))
end
name = append_prefix_suffix(name, prefix, suffix)
file = joinpath(path, name)
# Run the remaining logic on whether to produce or load
if !force && isfile(file)
Expand Down

0 comments on commit 83fea6e

Please sign in to comment.