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 with stage
in 23 minutes and 54 seconds
......@@ -104,9 +104,15 @@ function tryopenfile(controller, path; reload::Bool=false)
turn_load_animation_on(controller)
end
#
if !isfile(path)
@error "Cannot find file" file=path
hub[:input][] = nothing
return
end
records = loadfile(path)
if isempty(records)
@info "Cannot load file" file=path
hub[:input][] = nothing
return
elseif haskey(hub, :input)
hub[:input][] = path
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment