src/main.f90: fix chdir to absolute output path
This commit is contained in:
parent
621c725948
commit
1b814fcb8a
@ -80,9 +80,12 @@ program main
|
||||
|
||||
call init_misc(params, data)
|
||||
|
||||
! Get back to the initial directory
|
||||
err = chdir(cwd)
|
||||
|
||||
! Change the current directory to output files there
|
||||
if (allocated(opts%output_dir)) then
|
||||
if (chdir(trim(cwd) // '/' // opts%output_dir) /= 0) then
|
||||
if (chdir(opts%output_dir) /= 0) then
|
||||
call log_message(level=ERROR, mod='main', &
|
||||
msg='chdir to output_dir ('//opts%output_dir//') failed!')
|
||||
call exit(1)
|
||||
|
Loading…
Reference in New Issue
Block a user