-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
loading: Delete normpath where possible
#60251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
5d65187 to
9e4c09a
Compare
7z appears to normalize internally causing it to fail to extract archives that have this pattern. One way to reproduce is to set DEPOT_PATH to a path that has a symlink/.. in the path. We get this wrong in Julia too, c.f. JuliaLang/julia#60251
9e4c09a to
d6d6f2d
Compare
7z appears to normalize internally causing it to fail to extract archives that have this pattern. One way to reproduce is to set DEPOT_PATH to a path that has a symlink/.. in the path. We get this wrong in Julia too, c.f. JuliaLang/julia#60251
Fixes test failures with JuliaLang/julia#60251. Also fixes an unrelated test where Revise was using the wrong PkgId for Core.Compiler (failure not seen on CI, because it's explicitly disabled there).
Fixes test failures with JuliaLang/julia#60251. Also fixes an unrelated test where Revise was using the wrong PkgId for Core.Compiler (failure not seen on CI, because it's explicitly disabled there).
Fixes test failures with JuliaLang/julia#60251. Also fixes an unrelated test where Revise was using the wrong PkgId for Core.Compiler (failure not seen on CI, because it's explicitly disabled there).
* Adjust for base paths possibly being non-normalized Fixes test failures with JuliaLang/julia#60251. Also fixes an unrelated test where Revise was using the wrong PkgId for Core.Compiler (failure not seen on CI, because it's explicitly disabled there). * Try more realpaths * relpath? * WIP * Try to avoid calling realpath internally
|
Alright, we have some tests that specifically test that we strip |
770f1e5 to
ff57fe1
Compare
7z appears to normalize internally causing it to fail to extract archives that have this pattern. One way to reproduce is to set DEPOT_PATH to a path that has a symlink/.. in the path. We get this wrong in Julia too, c.f. JuliaLang/julia#60251 (cherry picked from commit 52d7fa3)
ff57fe1 to
af8a57d
Compare
Unix path semantics have a design flaw, where if `a` is a symbolic directory link, `x/a/..` refer's to the link target's parent directory rather than `x/`. As a result, `normpath` is not in general safe to run. We were doing this all over the place (either explicitly, or implicitly in `abspath`) causing us to fail to load files if their paths contained this pattern. Fix this by rm'ing normpath in most places in loading and adding an `normpath`/`abspath` kwarg that skips unsafe normalization. Where paths show up in printing, we can possibly put some back after verifying that the path resolution result does not change using `samefile`, but let's do that on a case-by-case basis.
af8a57d to
f16cf92
Compare
Unix path semantics have a design flaw, where if
ais a symbolic directory link,x/a/..refer's to the link target's parent directory rather thanx/. As a result,normpathis not in general safe to run. We were doing this all over the place (either explicitly, or implicitly inabspath) causing us to fail to load files if their paths contained this pattern. Fix this by rm'ing normpath in most places in loading and adding anabspathkwarg that skips normalization. Where paths show up in printing, we can possibly put some back after verifying that the path resolution result does not change usingsamefile, but let's do that on a case-by-case basis.