Normalize paths.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user