Skip to content

Commit

Permalink
Trying to fix jld2.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkschleg committed Jan 5, 2022
1 parent 60b19ad commit 736adc1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/data_manager.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ struct JLD2Manager <: SaveManager end

extension(::JLD2Manager) = ".jld2"

save(::JLD2Manager, path, data) = FileIO.save(path, data) # JLD2.@save
function save!(::JLD2Manager, path, data)
try
priorData = load(manager, path)
merge!(priorData, data)
save(manager, path, priorData)
catch
JLD2.@save savefile results
end
end
save(::JLD2Manager, path, results) = JLD2.@save path results # JLD2.@save
# function save!(::JLD2Manager, path, data)
# try
# priorData = load(manager, path)
# merge!(priorData, data)
# save(manager, path, priorData)
# catch
# save(manager, path, data)
# end
# end

load(::JLD2Manager, path) = FileIO.load(path)

Expand Down

0 comments on commit 736adc1

Please sign in to comment.