File tree 1 file changed +12
-10
lines changed
1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -311,17 +311,19 @@ async fn validate_activities(
311
311
Ok ( validated_activities)
312
312
}
313
313
314
- pub async fn read_sim_path ( data_dir : PathBuf , sim_file : PathBuf ) -> anyhow:: Result < PathBuf > {
315
- let sim_path = if sim_file. is_relative ( ) {
316
- data_dir. join ( sim_file)
317
- } else {
318
- sim_file
319
- } ;
320
-
321
- if sim_path. exists ( ) {
322
- Ok ( sim_path)
314
+ async fn read_sim_path ( data_dir : PathBuf , sim_file : PathBuf ) -> anyhow:: Result < PathBuf > {
315
+ if sim_file. exists ( ) {
316
+ Ok ( sim_file)
317
+ } else if sim_file. is_relative ( ) {
318
+ let sim_path = data_dir. join ( sim_file) ;
319
+ if sim_path. exists ( ) {
320
+ Ok ( sim_path)
321
+ } else {
322
+ log:: info!( "Simulation file '{}' does not exist." , sim_path. display( ) ) ;
323
+ select_sim_file ( data_dir) . await
324
+ }
323
325
} else {
324
- log:: info!( "Simulation file '{}' does not exist." , sim_path . display( ) ) ;
326
+ log:: info!( "Simulation file '{}' does not exist." , sim_file . display( ) ) ;
325
327
select_sim_file ( data_dir) . await
326
328
}
327
329
}
You can’t perform that action at this time.
0 commit comments