Skip to content

Commit

Permalink
fixup depot normalization from JuliaLang#51892
Browse files Browse the repository at this point in the history
  • Loading branch information
fatteneder committed Oct 28, 2023
1 parent ab1eec5 commit 7e8061d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2600,13 +2600,13 @@ end

function replace_depot_path(path::AbstractString)
for depot in DEPOT_PATH
# Skip depots that don't exist
if !isdirpath(depot)
continue
end
!isdir(depot) && continue

# Strip extraneous pathseps through normalization.
depot = dirname(depot)
if isdirpath(depot)
depot = dirname(depot)
end

if startswith(path, depot)
path = replace(path, depot => "@depot"; count=1)
break
Expand Down

0 comments on commit 7e8061d

Please sign in to comment.