Skip to content

Commit

Permalink
Normalize dependency paths
Browse files Browse the repository at this point in the history
On Windows just a difference in backslash/forwardslash can cause a
matching failure, but we shouldn't care about such differences.
  • Loading branch information
timholy committed Oct 12, 2017
1 parent 4247bba commit 1d74efc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion base/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ function _include_dependency(modstring::AbstractString, _path::AbstractString)
path = joinpath(dirname(prev), _path)
end
if _track_dependencies[]
push!(_require_dependencies, (modstring, path, mtime(path)))
push!(_require_dependencies, (modstring, normpath(path), mtime(path)))
end
return path, prev
end
Expand Down Expand Up @@ -733,6 +733,10 @@ function read_dependency_src(io::IO, filename::AbstractString)
modules, files, required_modules, srctextpos = parse_cache_header(io)
srctextpos == 0 && error("no source-text stored in cache file")
seek(io, srctextpos)
_read_dependency_src(io, filename)
end

function _read_dependency_src(io::IO, filename::AbstractString)
while !eof(io)
filenamelen = ntoh(read(io, Int32))
filenamelen == 0 && break
Expand Down

0 comments on commit 1d74efc

Please sign in to comment.