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 @@ -301,17 +301,19 @@ async fn validate_activities(
301
301
Ok ( validated_activities)
302
302
}
303
303
304
- pub async fn read_sim_path ( data_dir : PathBuf , sim_file : PathBuf ) -> anyhow:: Result < PathBuf > {
305
- let sim_path = if sim_file. is_relative ( ) {
306
- data_dir. join ( sim_file)
307
- } else {
308
- sim_file
309
- } ;
310
-
311
- if sim_path. exists ( ) {
312
- Ok ( sim_path)
304
+ async fn read_sim_path ( data_dir : PathBuf , sim_file : PathBuf ) -> anyhow:: Result < PathBuf > {
305
+ if sim_file. exists ( ) {
306
+ Ok ( sim_file)
307
+ } else if sim_file. is_relative ( ) {
308
+ let sim_path = data_dir. join ( sim_file) ;
309
+ if sim_path. exists ( ) {
310
+ Ok ( sim_path)
311
+ } else {
312
+ log:: info!( "Simulation file '{}' does not exist." , sim_path. display( ) ) ;
313
+ select_sim_file ( data_dir) . await
314
+ }
313
315
} else {
314
- log:: info!( "Simulation file '{}' does not exist." , sim_path . display( ) ) ;
316
+ log:: info!( "Simulation file '{}' does not exist." , sim_file . display( ) ) ;
315
317
select_sim_file ( data_dir) . await
316
318
}
317
319
}
You can’t perform that action at this time.
0 commit comments