From 7483acde5df45617d641b1dfd200bc7f1418059a Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Wed, 4 Jun 2014 22:48:08 -0500 Subject: [PATCH] Fix linking issue to directories in file module The os.path.isdir() returns True for symlinks that point to directories, so we also need to check to make sure it's not a symlink too. Fixes #7657 --- library/files/file | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/files/file b/library/files/file index 8d3a71a2379..0e50cb67e89 100644 --- a/library/files/file +++ b/library/files/file @@ -189,7 +189,7 @@ def main(): elif state in ['link','hard']: - if os.path.isdir(path): + if os.path.isdir(path) and not os.path.islink(path): relpath = path else: relpath = os.path.dirname(path)