Skip to content

Commit d3854f2

Browse files
committed
ensure trimmed filenames
1 parent ccdffb4 commit d3854f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fpm_compile_commands.F90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,13 +272,13 @@ subroutine cct_register(self, command, error)
272272
allocate(character(len=0) :: source_file)
273273
find_source_file: do i = 1, n-1
274274
if (args(i) == "-c") then
275-
source_file = args(i+1)
275+
source_file = trim(args(i+1))
276276
exit find_source_file
277277
end if
278278
end do find_source_file
279279

280280
! Fallback: use last argument if not found
281-
if (len_trim(source_file)==0) source_file = args(n)
281+
if (len_trim(source_file)==0) source_file = trim(args(n))
282282

283283
! Fill in the compile_command_t
284284
cmd = compile_command_t(directory = string_t(cwd), &

0 commit comments

Comments
 (0)