Skip to content

Commit

Permalink
Strip leading and trailing blanks from file names
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrack committed Nov 5, 2024
1 parent 0063a57 commit 7a48e47
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/input/cp_parser_types.F
Original file line number Diff line number Diff line change
Expand Up @@ -190,17 +190,17 @@ SUBROUTINE parser_create(parser, file_name, unit_nr, para_env, end_section_label
parser%para_env = mp_comm_self
END IF

! *** Get the logical output unit number for error messages ***
! Get the logical output unit number for error messages
IF (parser%para_env%is_source()) THEN
IF (PRESENT(unit_nr)) THEN
parser%input_unit = unit_nr
IF (PRESENT(file_name)) parser%input_file_name = file_name
IF (PRESENT(file_name)) parser%input_file_name = TRIM(ADJUSTL(file_name))
ELSE
IF (.NOT. PRESENT(file_name)) &
CPABORT("at least one of filename and unit_nr must be present")
CALL open_file(file_name=TRIM(file_name), &
CALL open_file(file_name=TRIM(ADJUSTL(file_name)), &
unit_number=parser%input_unit)
parser%input_file_name = file_name
parser%input_file_name = TRIM(ADJUSTL(file_name))
END IF
END IF

Expand Down

0 comments on commit 7a48e47

Please sign in to comment.