@@ -964,7 +964,7 @@ function project_file_manifest_path(project_file::String)::Union{Nothing,String}
964964 manifest_path = get (cache. project_file_manifest_path, project_file, missing )
965965 manifest_path === missing || return manifest_path
966966 end
967- dir = abspath (dirname (project_file); normalize = false )
967+ dir = abspath (dirname (project_file); safe = true )
968968 isfile_casesensitive (project_file) || return nothing
969969 d = parsed_toml (project_file)
970970 base_manifest = workspace_manifest (project_file)
@@ -1248,7 +1248,7 @@ function explicit_manifest_entry_load_spec(manifest_file::String, pkg::PkgId, en
12481248 for slug in (version_slug (uuid, hash), version_slug (uuid, hash, 4 ))
12491249 for depot in DEPOT_PATH
12501250 path = joinpath (depot, " packages" , pkg. name, slug)
1251- ispath (path) && return PkgLoadSpec (entry_path (abspath (path; normalize = false ), pkg. name, entryfile), syntax_version)
1251+ ispath (path) && return PkgLoadSpec (entry_path (abspath (path; safe = true ), pkg. name, entryfile), syntax_version)
12521252 end
12531253 end
12541254 # no depot contains the package, return missing to stop looking
@@ -2394,9 +2394,9 @@ function _include_dependency!(dep_list::Vector{Any}, track_dependencies::Bool,
23942394 track_content:: Bool , path_may_be_dir:: Bool )
23952395 prev = source_path (nothing )
23962396 if prev === nothing
2397- path = abspath (_path)
2397+ path = abspath (_path; safe = true )
23982398 else
2399- path = joinpath (dirname (prev), _path)
2399+ path = normpath ( joinpath (dirname (prev), _path); safe = true )
24002400 end
24012401 if ! track_dependencies[]
24022402 if ! path_may_be_dir && ! isfile (path)
@@ -3194,11 +3194,11 @@ evalfile(path::AbstractString, args::Vector) = evalfile(path, String[args...])
31943194# Used in Pkg.jl
31953195function load_path_setup_code (load_path:: Bool = true )
31963196 code = """
3197- append!(empty!(Base.DEPOT_PATH), $(repr (map (x -> abspath (x; normalize = false ), DEPOT_PATH ))) )
3198- append!(empty!(Base.DL_LOAD_PATH), $(repr (map (x -> abspath (x; normalize = false ), DL_LOAD_PATH))) )
3197+ append!(empty!(Base.DEPOT_PATH), $(repr (map (x -> abspath (x; safe = true ), DEPOT_PATH ))) )
3198+ append!(empty!(Base.DL_LOAD_PATH), $(repr (map (x -> abspath (x; safe = true ), DL_LOAD_PATH))) )
31993199 """
32003200 if load_path
3201- load_path = map (x -> abspath (x; normalize = false ), Base. load_path ())
3201+ load_path = map (x -> abspath (x; safe = true ), Base. load_path ())
32023202 path_sep = Sys. iswindows () ? ' ;' : ' :'
32033203 any (path -> path_sep in path, load_path) &&
32043204 error (" LOAD_PATH entries cannot contain $(repr (path_sep)) " )
@@ -3284,9 +3284,9 @@ function create_expr_cache(pkg::PkgId, input::PkgLoadSpec, output::String, outpu
32843284 @nospecialize internal_stderr internal_stdout
32853285 rm (output, force= true ) # Remove file if it exists
32863286 output_o === nothing || rm (output_o, force= true )
3287- depot_path = String[abspath (x; normalize = false ) for x in DEPOT_PATH ]
3288- dl_load_path = String[abspath (x; normalize = false ) for x in DL_LOAD_PATH]
3289- load_path = String[abspath (x; normalize = false ) for x in Base. load_path ()]
3287+ depot_path = String[abspath (x; safe = true ) for x in DEPOT_PATH ]
3288+ dl_load_path = String[abspath (x; safe = true ) for x in DL_LOAD_PATH]
3289+ load_path = String[abspath (x; safe = true ) for x in Base. load_path ()]
32903290 # if pkg is a stdlib, append its parent Project.toml to the load path
32913291 triggers = get (EXT_PRIMED, pkg, nothing )
32923292 if triggers != = nothing
@@ -3344,7 +3344,7 @@ function create_expr_cache(pkg::PkgId, input::PkgLoadSpec, output::String, outpu
33443344 Base.track_nested_precomp($(_pkg_str (vcat (Base. precompilation_stack, pkg))) )
33453345 Base.loadable_extensions = $(_pkg_str (loadable_exts))
33463346 Base.precompiling_extension = $(loading_extension)
3347- Base.include_package_for_output($(_pkg_str (pkg)) , $(repr (abspath (input. path; normalize = false ))) , $(repr (input. julia_syntax_version)) , $(repr (depot_path)) , $(repr (dl_load_path)) ,
3347+ Base.include_package_for_output($(_pkg_str (pkg)) , $(repr (abspath (input. path; safe = true ))) , $(repr (input. julia_syntax_version)) , $(repr (depot_path)) , $(repr (dl_load_path)) ,
33483348 $(repr (load_path)) , $(_pkg_str (concrete_deps)) , $(repr (source_path (nothing ))) )
33493349 """ )
33503350 close (io. in)
0 commit comments