File tree Expand file tree Collapse file tree 2 files changed +2
-22
lines changed Expand file tree Collapse file tree 2 files changed +2
-22
lines changed Original file line number Diff line number Diff line change @@ -3123,20 +3123,15 @@ mutable struct CacheHeaderIncludes
3123
3123
end
3124
3124
3125
3125
function replace_depot_path (path:: AbstractString )
3126
- @static if Sys. iswindows ()
3127
- path = replace (path, Filesystem. path_separator_re=> Filesystem. pathsep ())
3128
- end
3126
+ path = normpath (path)
3129
3127
for depot in DEPOT_PATH
3130
3128
! isdir (depot) && continue
3131
3129
3132
3130
# Strip extraneous pathseps through normalization.
3133
3131
if isdirpath (depot)
3134
3132
depot = dirname (depot)
3135
3133
end
3136
-
3137
- @static if Sys. iswindows ()
3138
- depot = replace (depot, Filesystem. path_separator_re=> Filesystem. pathsep ())
3139
- end
3134
+ depot = normpath (depot)
3140
3135
3141
3136
if startswith (path, string (depot, Filesystem. pathsep ())) || path == depot
3142
3137
path = replace (path, depot => " @depot" ; count= 1 )
Original file line number Diff line number Diff line change @@ -70,21 +70,6 @@ if !test_relocated_depot
70
70
@test Base. replace_depot_path (jlrc) != " @depot-rc2"
71
71
@test Base. replace_depot_path (jlrc) == jlrc
72
72
end
73
- if Sys. iswindows ()
74
- # windows accepts '\\' and '/' as path separators
75
- mktempdir () do dir
76
- jlrc = string (dir, " /" , " julia-rc2" )
77
- jl = string (dir, " /" , " julia" )
78
- mkdir (jl)
79
- push! (DEPOT_PATH , jl)
80
- @test Base. replace_depot_path (jl) == " @depot"
81
- @test Base. replace_depot_path (string (jl," /" )) == string (" @depot" ," \\ " )
82
- @test Base. replace_depot_path (string (jl," \\ " )) == string (" @depot" ," \\ " )
83
- @test Base. replace_depot_path (jlrc) != " @depot-rc2"
84
- @test Base. replace_depot_path (jlrc) ==
85
- replace (jlrc, Base. Filesystem. path_separator_re=> " \\ " )
86
- end
87
- end
88
73
end
89
74
90
75
end
You can’t perform that action at this time.
0 commit comments