Skip to content
Permalink
Browse files

fix #1785

  • Loading branch information
Kwpolska committed Jun 4, 2015
1 parent f7ae41a commit 5fd54785c87185702593d1ce1f346fcefd2354fb
Showing with 4 additions and 4 deletions.
  1. +3 −3 nikola/plugins/task/galleries.py
  2. +1 −1 nikola/plugins/task/listings.py
@@ -124,18 +124,18 @@ def _find_gallery_path(self, name):
def gallery_path(self, name, lang): def gallery_path(self, name, lang):
gallery_path = self._find_gallery_path(name) gallery_path = self._find_gallery_path(name)
return [_f for _f in [self.site.config['TRANSLATIONS'][lang]] + return [_f for _f in [self.site.config['TRANSLATIONS'][lang]] +
list(os.path.split(gallery_path)) + gallery_path.split(os.sep) +
[self.site.config['INDEX_FILE']] if _f] [self.site.config['INDEX_FILE']] if _f]


def gallery_global_path(self, name, lang): def gallery_global_path(self, name, lang):
gallery_path = self._find_gallery_path(name) gallery_path = self._find_gallery_path(name)
return [_f for _f in list(os.path.split(gallery_path)) + return [_f for _f in gallery_path.split(os.sep) +
[self.site.config['INDEX_FILE']] if _f] [self.site.config['INDEX_FILE']] if _f]


def gallery_rss_path(self, name, lang): def gallery_rss_path(self, name, lang):
gallery_path = self._find_gallery_path(name) gallery_path = self._find_gallery_path(name)
return [_f for _f in [self.site.config['TRANSLATIONS'][lang]] + return [_f for _f in [self.site.config['TRANSLATIONS'][lang]] +
list(os.path.split(gallery_path)) + gallery_path.split(os.sep) +
['rss.xml'] if _f] ['rss.xml'] if _f]


def gen_tasks(self): def gen_tasks(self):
@@ -258,5 +258,5 @@ def listing_path(self, namep, lang):
sys.exit(1) sys.exit(1)
if not name.endswith(os.sep + self.site.config["INDEX_FILE"]): if not name.endswith(os.sep + self.site.config["INDEX_FILE"]):
name += '.html' name += '.html'
path_parts = list(os.path.split(name)) path_parts = name.split(os.sep)
return [_f for _f in path_parts if _f] return [_f for _f in path_parts if _f]

0 comments on commit 5fd5478

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