diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 00000000..8a0602e8 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,3 @@ +Release type: minor + +Fix symlink handling in `pelican-themes`. diff --git a/pelican/tools/pelican_themes.py b/pelican/tools/pelican_themes.py index fa59b8fd..4d8cee2d 100755 --- a/pelican/tools/pelican_themes.py +++ b/pelican/tools/pelican_themes.py @@ -249,6 +249,7 @@ def install(path, v=False, u=False): def symlink(path, v=False): """Symbolically link a theme""" + path = os.path.realpath(path) if not os.path.exists(path): err(path + " : no such file or directory") elif not os.path.isdir(path): @@ -269,7 +270,7 @@ def symlink(path, v=False): def is_broken_link(path): """Returns True if the path given as is a broken symlink""" - path = os.readlink(path) + path = os.path.realpath(path) return not os.path.exists(path)