Skip to content
Snippets Groups Projects
Commit 28163cb3 authored by Peter Scheibel's avatar Peter Scheibel Committed by Greg Becker
Browse files

determine target relative to the link directory rather than the full link path...

determine target relative to the link directory rather than the full link path (which includes the file name) (#13727)
parent b2800343
No related branches found
No related tags found
No related merge requests found
...@@ -488,11 +488,11 @@ def make_link_relative(cur_path_names, orig_path_names): ...@@ -488,11 +488,11 @@ def make_link_relative(cur_path_names, orig_path_names):
Change absolute links to be relative. Change absolute links to be relative.
""" """
for cur_path, orig_path in zip(cur_path_names, orig_path_names): for cur_path, orig_path in zip(cur_path_names, orig_path_names):
old_src = os.readlink(orig_path) target = os.readlink(orig_path)
new_src = os.path.relpath(old_src, orig_path) relative_target = os.path.relpath(target, os.path.dirname(orig_path))
os.unlink(cur_path) os.unlink(cur_path)
os.symlink(new_src, cur_path) os.symlink(relative_target, cur_path)
def make_macho_binaries_relative(cur_path_names, orig_path_names, old_dir, def make_macho_binaries_relative(cur_path_names, orig_path_names, old_dir,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment