File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -331,17 +331,19 @@ async fn validate_activities(
331331 Ok ( validated_activities)
332332}
333333
334- pub async fn read_sim_path ( data_dir : PathBuf , sim_file : PathBuf ) -> anyhow:: Result < PathBuf > {
335- let sim_path = if sim_file. is_relative ( ) {
336- data_dir. join ( sim_file)
337- } else {
338- sim_file
339- } ;
340-
341- if sim_path. exists ( ) {
342- Ok ( sim_path)
334+ async fn read_sim_path ( data_dir : PathBuf , sim_file : PathBuf ) -> anyhow:: Result < PathBuf > {
335+ if sim_file. exists ( ) {
336+ Ok ( sim_file)
337+ } else if sim_file. is_relative ( ) {
338+ let sim_path = data_dir. join ( sim_file) ;
339+ if sim_path. exists ( ) {
340+ Ok ( sim_path)
341+ } else {
342+ log:: info!( "Simulation file '{}' does not exist." , sim_path. display( ) ) ;
343+ select_sim_file ( data_dir) . await
344+ }
343345 } else {
344- log:: info!( "Simulation file '{}' does not exist." , sim_path . display( ) ) ;
346+ log:: info!( "Simulation file '{}' does not exist." , sim_file . display( ) ) ;
345347 select_sim_file ( data_dir) . await
346348 }
347349}
You can’t perform that action at this time.
0 commit comments