mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fix symbolic link handling in pelican-themes -s/-c (#3392)
This commit is contained in:
parent
0cb445c813
commit
08283b4915
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue