Cannot readlink() on a hard link
This commit is contained in:
parent
3e09de7aef
commit
f7fafa8c16
1 changed files with 1 additions and 1 deletions
|
@ -170,7 +170,7 @@ def main():
|
||||||
src = os.path.expanduser(src)
|
src = os.path.expanduser(src)
|
||||||
else:
|
else:
|
||||||
if state in ['link','hard']:
|
if state in ['link','hard']:
|
||||||
if follow:
|
if follow and state == 'link':
|
||||||
# use the current target of the link as the source
|
# use the current target of the link as the source
|
||||||
src = os.readlink(path)
|
src = os.readlink(path)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue