Skip to content

Commit 3586be0

Browse files
committed
Adapt native paths for dependency paths on Windows
1 parent ea7e6c4 commit 3586be0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/fpm/manifest/dependency.f90

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ module fpm_manifest_dependency
2727
use fpm_git, only : git_target_t, git_target_tag, git_target_branch, &
2828
& git_target_revision, git_target_default
2929
use fpm_toml, only : toml_table, toml_key, toml_stat, get_value
30+
use fpm_filesystem, only: windows_path
31+
use fpm_environment, only: get_os_type, OS_WINDOWS
3032
implicit none
3133
private
3234

@@ -80,6 +82,7 @@ subroutine new_dependency(self, table, root, error)
8082

8183
call get_value(table, "path", url)
8284
if (allocated(url)) then
85+
if (get_os_type() == OS_WINDOWS) url = windows_path(url)
8386
if (present(root)) url = root//url ! Relative to the fpm.toml it’s written in
8487
call move_alloc(url, self%path)
8588
else

0 commit comments

Comments
 (0)