From e673eb2812b1dd8b01f46a2f26be2799269b736d Mon Sep 17 00:00:00 2001 From: Yoshinori Okuji <yo@nexedi.com> Date: Mon, 24 Jul 2006 23:15:04 +0000 Subject: [PATCH] Normalize the paths to eliminate the effect of double-slashes. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8729 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/BusinessTemplate.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py index ea8e3f34fc..094069221d 100644 --- a/product/ERP5/Document/BusinessTemplate.py +++ b/product/ERP5/Document/BusinessTemplate.py @@ -193,7 +193,9 @@ class BusinessTemplateFolder(BusinessTemplateArchive): f.close() def _initImport(self, file=None, path=None, **kw): - self.file_list = file + # Normalize the paths to eliminate the effect of double-slashes. + self.file_list = [os.path.normpath(f) for f in file] + path = os.path.normpath(path) # to make id consistent, must remove a part of path while importing self.root_path_len = len(string.split(path, os.sep)) + 1 -- 2.30.9