Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e05e806

Browse files
committedSep 26, 2016
Getting rid of _force_source.
1 parent ceea3d0 commit e05e806

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed
 

‎nikola/post.py

+7-10
Original file line numberDiff line numberDiff line change
@@ -762,26 +762,23 @@ def remaining_paragraph_count(self):
762762
def source_link(self, lang=None):
763763
"""Return absolute link to the post's source."""
764764
ext = self.source_ext(True)
765-
link = "/" + self.destination_path(lang=lang, extension=ext, sep='/', _force_source=True)
765+
link = "/" + self.destination_path(lang=lang, extension=ext, sep='/')
766766
link = utils.encodelink(link)
767767
return link
768768

769-
def destination_path(self, lang=None, extension='.html', sep=os.sep, _force_source=False):
769+
def destination_path(self, lang=None, extension='.html', sep=os.sep):
770770
"""Destination path for this post, relative to output/.
771771
772772
If lang is not specified, it's the current language.
773773
Extension is used in the path if specified.
774774
"""
775775
if lang is None:
776776
lang = nikola.utils.LocaleBorg().current_lang
777-
if _force_source:
778-
folder = self.folder
779-
else:
780-
folder = self.meta[lang].get('path', self.folder_relative)
781-
if isinstance(self.folder_base, (utils.bytes_str, utils.unicode_str)):
782-
folder = os.path.normpath(os.path.join(self.folder_base, folder))
783-
elif self.folder_base is not None:
784-
folder = os.path.normpath(os.path.join(self.folder_base(lang), folder))
777+
folder = self.meta[lang].get('path', self.folder_relative)
778+
if isinstance(self.folder_base, (utils.bytes_str, utils.unicode_str)):
779+
folder = os.path.normpath(os.path.join(self.folder_base, folder))
780+
elif self.folder_base is not None:
781+
folder = os.path.normpath(os.path.join(self.folder_base(lang), folder))
785782
if self._has_pretty_url(lang):
786783
path = os.path.join(self.translations[lang],
787784
folder, self.meta[lang]['slug'], 'index' + extension)

0 commit comments

Comments
 (0)
Please sign in to comment.