Merge pull request #827 from d0ugal/master

Handle relative paths in symlinks
This commit is contained in:
Dougal Matthews
2016-02-18 21:48:38 +00:00
3 changed files with 5 additions and 3 deletions

View File

@@ -14,9 +14,10 @@ You can determine your currently installed version using `mkdocs --version`:
mkdocs, version 0.15.2
## Version 0.15.3 (2016-02-??)
## Version 0.15.3 (2016-02-18)
* Improve the error message the given theme can't be found.
* Fix an issue with relative symlinks (#639)
## Version 0.15.2 (2016-02-08)

View File

@@ -9,4 +9,4 @@ if sys.version_info < (2, 7):
sys.stderr.write(("WARNING: Support for Python 2.6 will be dropped in the "
"1.0.0 release of MkDocs\n\n"))
__version__ = '0.15.2'
__version__ = '0.15.3'

View File

@@ -352,7 +352,8 @@ class Extras(OptionallyRequired):
# Some editors (namely Emacs) will create temporary symlinks
# for internal magic. We can just ignore these files.
if os.path.islink(fullpath):
if not os.path.exists(os.readlink(fullpath)):
fp = os.path.join(dirpath, os.readlink(fullpath))
if not os.path.exists(fp):
continue
relpath = os.path.normpath(os.path.relpath(fullpath, docs_dir))