File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -233,16 +233,18 @@ async fn main() -> anyhow::Result<()> {
233233}
234234
235235async fn read_sim_path ( data_dir : PathBuf , sim_file : PathBuf ) -> anyhow:: Result < PathBuf > {
236- let sim_path = if sim_file. is_relative ( ) {
237- data_dir. join ( sim_file)
238- } else {
239- sim_file
240- } ;
241-
242- if sim_path. exists ( ) {
243- Ok ( sim_path)
236+ if sim_file. exists ( ) {
237+ Ok ( sim_file)
238+ } else if sim_file. is_relative ( ) {
239+ let sim_path = data_dir. join ( sim_file) ;
240+ if sim_path. exists ( ) {
241+ Ok ( sim_path)
242+ } else {
243+ log:: info!( "Simulation file '{}' does not exist." , sim_path. display( ) ) ;
244+ select_sim_file ( data_dir) . await
245+ }
244246 } else {
245- log:: info!( "Simulation file '{}' does not exist." , sim_path . display( ) ) ;
247+ log:: info!( "Simulation file '{}' does not exist." , sim_file . display( ) ) ;
246248 select_sim_file ( data_dir) . await
247249 }
248250}
You can’t perform that action at this time.
0 commit comments