Skip to content
Permalink
Browse files

Fixed broken logic.

  • Loading branch information
felixfontein committed Sep 19, 2016
1 parent b4ed2e6 commit 14b33b7123fb0c35d199d2d6e53ecb5c0c18c3d7
Showing with 5 additions and 4 deletions.
  1. +5 −4 nikola/post.py
@@ -772,9 +772,10 @@ def destination_path(self, lang=None, extension='.html', sep=os.sep, _force_sour
"""
if lang is None:
lang = nikola.utils.LocaleBorg().current_lang
folder = self.folder
if not _force_source:
folder = self.meta[lang].get('path', folder)
if _force_source:
folder = self.folder
else:
folder = self.meta[lang].get('path', self.folder_relative)
if self.folder_base is not None:
folder = os.path.normpath(os.path.join(self.folder_base, folder))
if self._has_pretty_url(lang):
@@ -854,7 +855,7 @@ def permalink(self, lang=None, absolute=False, extension='.html', query=None):
extension = self.compiler.extension()

pieces = self.translations[lang].split(os.sep)
folder = self.meta[lang].get('path', self.folder)
folder = self.meta[lang].get('path', self.folder_relative)
if self.folder_base is not None:
folder = os.path.normpath(os.path.join(self.folder_base, folder))
pieces += folder.split(os.sep)

0 comments on commit 14b33b7

Please sign in to comment.
You can’t perform that action at this time.