Cannot readlink() on a hard link

This commit is contained in:
Toshio Kuratomi 2014-11-19 13:04:44 -08:00
parent c46f39f044
commit 19b328c4df

View file

@ -170,7 +170,7 @@ def main():
src = os.path.expanduser(src)
else:
if state in ['link','hard']:
if follow:
if follow and state == 'link':
# use the current target of the link as the source
src = os.readlink(path)
else: