Skip to content

Commit

Permalink
Fix support for files outside of site root directory on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwpolska committed May 30, 2021
1 parent 71b6701 commit 650b954
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Features
Bugfixes
--------

* Fix support for files outside of site root directory on Windows
* Support passing ``--backend`` and ``--db-file`` to ``nikola auto``
* Support blank values in certain WordPress-imported structures
(Issue #3535)
Expand Down
2 changes: 1 addition & 1 deletion nikola/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def _set_paths(self, source_path):
self.post_name = os.path.splitext(source_path)[0] # posts/blah
_relpath = os.path.relpath(self.post_name)
if _relpath != self.post_name:
self.post_name = _relpath.replace('..' + os.sep, '_..' + os.sep)
self.post_name = _relpath.replace('..' + os.sep, '__dotdot__' + os.sep)
# cache[\/]posts[\/]blah.html
self.base_path = os.path.join(self.config['CACHE_FOLDER'], self.post_name + ".html")
# cache/posts/blah.html
Expand Down

0 comments on commit 650b954

Please sign in to comment.