Normalize paths.

This commit is contained in:
Simon Conseil
2013-04-19 23:12:18 +02:00
parent 72672325b0
commit a87567f607
2 changed files with 3 additions and 3 deletions

View File

@@ -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:

View File

@@ -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)