From 19b328c4df2157b6c0191e9144236643ce2be890 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 19 Nov 2014 13:04:44 -0800 Subject: [PATCH] Cannot readlink() on a hard link --- files/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/file.py b/files/file.py index be7b05aaf52..7aa5e45d7bc 100644 --- a/files/file.py +++ b/files/file.py @@ -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: