forked from Mirror/pmbootstrap
I've replaced all instances in the code of `os.path.abspath` with `os.path.realpath`, as this does the same as `abspath` plus resolving symlinks. See also: https://stackoverflow.com/a/40311142
This commit is contained in:
parent
2f8d589ed6
commit
ff9f2d620f
19 changed files with 24 additions and 24 deletions
|
@ -66,7 +66,7 @@ def symlink(args, file, link):
|
|||
"""
|
||||
if os.path.exists(link):
|
||||
if (os.path.islink(link) and
|
||||
os.path.abspath(os.readlink(link)) == os.path.abspath(file)):
|
||||
os.path.realpath(os.readlink(link)) == os.path.realpath(file)):
|
||||
return
|
||||
raise RuntimeError("File exists: " + link)
|
||||
elif os.path.islink(link):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue