Skip to content

Commit 35ae709

Browse files
committed
Fix: basename function with trim
Output of split (M_strings) needs trimming.
1 parent f32d6c3 commit 35ae709

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fpm/src/fpm_filesystem.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ function basename(path,suffix) result (base)
3030

3131
if (with_suffix) then
3232
call split(path,file_parts,delimiters='\/')
33-
base = file_parts(size(file_parts))
33+
base = trim(file_parts(size(file_parts)))
3434
else
3535
call split(path,file_parts,delimiters='\/.')
36-
base = file_parts(size(file_parts)-1)
36+
base = trim(file_parts(size(file_parts)-1))
3737
end if
3838

3939
end function basename

0 commit comments

Comments
 (0)