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 @@ -319,17 +319,19 @@ async fn validate_activities(
319
319
Ok ( validated_activities)
320
320
}
321
321
322
- pub async fn read_sim_path ( data_dir : PathBuf , sim_file : PathBuf ) -> anyhow:: Result < PathBuf > {
323
- let sim_path = if sim_file. is_relative ( ) {
324
- data_dir. join ( sim_file)
325
- } else {
326
- sim_file
327
- } ;
328
-
329
- if sim_path. exists ( ) {
330
- Ok ( sim_path)
322
+ async fn read_sim_path ( data_dir : PathBuf , sim_file : PathBuf ) -> anyhow:: Result < PathBuf > {
323
+ if sim_file. exists ( ) {
324
+ Ok ( sim_file)
325
+ } else if sim_file. is_relative ( ) {
326
+ let sim_path = data_dir. join ( sim_file) ;
327
+ if sim_path. exists ( ) {
328
+ Ok ( sim_path)
329
+ } else {
330
+ log:: info!( "Simulation file '{}' does not exist." , sim_path. display( ) ) ;
331
+ select_sim_file ( data_dir) . await
332
+ }
331
333
} else {
332
- log:: info!( "Simulation file '{}' does not exist." , sim_path . display( ) ) ;
334
+ log:: info!( "Simulation file '{}' does not exist." , sim_file . display( ) ) ;
333
335
select_sim_file ( data_dir) . await
334
336
}
335
337
}
You can’t perform that action at this time.
0 commit comments