File tree 1 file changed +11
-9
lines changed 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<()> {
233
233
}
234
234
235
235
async 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
+ }
244
246
} else {
245
- log:: info!( "Simulation file '{}' does not exist." , sim_path . display( ) ) ;
247
+ log:: info!( "Simulation file '{}' does not exist." , sim_file . display( ) ) ;
246
248
select_sim_file ( data_dir) . await
247
249
}
248
250
}
You can’t perform that action at this time.
0 commit comments