Skip to content

Commit

Permalink
stale_cachefile: account for path separator when checking @depot (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
fatteneder authored Jan 30, 2024
1 parent 75c38e3 commit b7520d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2748,7 +2748,7 @@ function restore_depot_path(path::AbstractString, depot::AbstractString)
end

function resolve_depot(inc::AbstractString)
startswith(inc, "@depot") || return :not_relocatable
startswith(inc, string("@depot", Filesystem.pathsep())) || return :not_relocatable
for depot in DEPOT_PATH
isfile(restore_depot_path(inc, depot)) && return depot
end
Expand Down Expand Up @@ -2927,7 +2927,7 @@ function _read_dependency_src(io::IO, filename::AbstractString, includes::Vector
filenamelen == 0 && break
depotfn = String(read(io, filenamelen))
len = read(io, UInt64)
fn = if !startswith(depotfn, "@depot")
fn = if !startswith(depotfn, string("@depot", Filesystem.pathsep()))
depotfn
else
basefn = restore_depot_path(depotfn, "")
Expand Down Expand Up @@ -3441,7 +3441,7 @@ end
end
for chi in includes
f, fsize_req, hash_req, ftime_req = chi.filename, chi.fsize, chi.hash, chi.mtime
if startswith(f, "@depot/")
if startswith(f, string("@depot", Filesystem.pathsep()))
@debug("Rejecting stale cache file $cachefile because its depot could not be resolved")
record_reason(reasons, "nonresolveable depot")
return true
Expand Down

0 comments on commit b7520d9

Please sign in to comment.