Skip to content

Commit b1cea4c

Browse files
committed
Ensure that directories always end in '/' for canonical_rpaths()
1 parent 9f6944e commit b1cea4c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Abstract/DynamicLink.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ function canonical_rpaths(rpath::RPath)
130130
paths[idx] = replace(paths[idx], "@loader_path" => origin)
131131
paths[idx] = replace(paths[idx], "@executable_path" => origin)
132132
paths[idx] = abspath(paths[idx])
133+
134+
# Make sure that if it's a directory, it _always_ has a "/" at the end.
135+
if isdir(paths[idx]) && paths[idx][end] != '/'
136+
paths[idx] = paths[idx] * "/"
137+
end
133138
end
134139
return paths
135140
end

src/COFF/COFFDynamicLink.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,5 @@ rpaths(crp::COFFRPath) = String[]
7171

7272
# COFF files don't have an RPath, but they _do_ always search the $ORIGIN
7373
function canonical_rpaths(crp::COFFRPath)
74-
return [dirname(path(handle(crp)))]
74+
return [abspath(dirname(path(handle(crp))) * "/")]
7575
end

0 commit comments

Comments
 (0)