Skip to content
Snippets Groups Projects
Commit 6b13f04d authored by François  LAURENT's avatar François LAURENT
Browse files

fix: tryopenfile updates :input on missing or failing input file

parent 9b64aacb
No related branches found
No related tags found
1 merge request!24Set of commits to be tagged v0.20
Pipeline #150426 passed
...@@ -104,9 +104,15 @@ function tryopenfile(controller, path; reload::Bool=false) ...@@ -104,9 +104,15 @@ function tryopenfile(controller, path; reload::Bool=false)
turn_load_animation_on(controller) turn_load_animation_on(controller)
end end
# #
if !isfile(path)
@error "Cannot find file" file=path
hub[:input][] = nothing
return
end
records = loadfile(path) records = loadfile(path)
if isempty(records) if isempty(records)
@info "Cannot load file" file=path @info "Cannot load file" file=path
hub[:input][] = nothing
return return
elseif haskey(hub, :input) elseif haskey(hub, :input)
hub[:input][] = path hub[:input][] = path
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment