From 690b0bdb3c8d503dfb00298b44ca799543e5f938 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Sun, 18 Nov 2007 14:19:33 +0000 Subject: [PATCH] Fix 0001361: Web report: Directory name conflicts svn: r9366 --- ChangeLog | 4 ++++ src/plugins/NarrativeWeb.py | 20 ++++++++------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index df59918b5..e3c6a508f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-11-18 Brian Matherly + * src/plugins/NarrativeWeb.py: Fix 0001361: Web report: Directory name + conflicts + 2007-11-17 Martin Hawlisch * src/DisplayModels/_RepositoryModel.py: Properly display the city diff --git a/src/plugins/NarrativeWeb.py b/src/plugins/NarrativeWeb.py index ca6cdfcbe..ae5c6e7bf 100644 --- a/src/plugins/NarrativeWeb.py +++ b/src/plugins/NarrativeWeb.py @@ -228,9 +228,7 @@ class BasePage: return of def link_path(self,name,path): - path = "%s/%s/%s" % (path,name[0],name[1]) - if os.sys.platform == "win32": - path = path.lower() + path = "%s/%s/%s" % (path,name[0].lower(),name[1].lower()) path = self.build_name(path,name) return path @@ -241,9 +239,9 @@ class BasePage: of = codecs.EncodedFile(self.string_io,'utf-8', self.encoding,'xmlcharrefreplace') else: - dirname = os.path.join(self.html_dir,path,name[0],name[1]) - if os.sys.platform == "win32": - dirname = dirname.lower() + dirname = os.path.join(self.html_dir, + path,name[0].lower(), + name[1].lower()) if not os.path.isdir(dirname): os.makedirs(dirname) page_name = self.build_name(dirname,name) @@ -592,13 +590,11 @@ class BasePage: def build_path(self,handle,dirroot,up=False): path = "" if up: - path = '../../../%s/%s/%s' % (dirroot,handle[0],handle[1]) + path = '../../../%s/%s/%s' % (dirroot, + handle[0].lower(), + handle[1].lower()) else: - path = "%s/%s/%s" % (dirroot,handle[0],handle[1]) - - if os.sys.platform == "win32": - path = path.lower() - + path = "%s/%s/%s" % (dirroot,handle[0].lower(),handle[1].lower()) return path def build_name(self,path,base):