From a87567f607fc5c231111abc41a90406c02309a43 Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Fri, 19 Apr 2013 23:12:18 +0200 Subject: [PATCH] Normalize paths. --- sigal/gallery.py | 4 ++-- sigal/writer.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sigal/gallery.py b/sigal/gallery.py index 5a1700c..62f93ac 100644 --- a/sigal/gallery.py +++ b/sigal/gallery.py @@ -172,11 +172,11 @@ class Gallery(object): # loop on directories in reversed order, to process subdirectories # before their parent for path in reversed(self.db['paths_list']): - imglist = [join(self.input_dir, path, f) + imglist = [os.path.normpath(join(self.input_dir, path, f)) for f in self.db[path]['img']] # output dir for the current path - img_out = join(self.output_dir, path) + img_out = os.path.normpath(join(self.output_dir, path)) check_or_create_dir(img_out) if len(imglist) != 0: diff --git a/sigal/writer.py b/sigal/writer.py index 247e56a..582747d 100644 --- a/sigal/writer.py +++ b/sigal/writer.py @@ -118,7 +118,7 @@ class Writer(object): def generate_context(self, paths, relpath): """Generate the context dict for the given path.""" - path = os.path.join(self.output_dir, relpath) + path = os.path.normpath(os.path.join(self.output_dir, relpath)) index_url = os.path.relpath(self.output_dir, path) + '/' + self.url_ext self.logger.info("Output path : %s", path)