[CMF-checkins] CVS: CMF/CMFCore - utils.py:1.28.4.4
Chris Withers
chrisw@nipltd.com
Mon, 19 Aug 2002 13:12:40 -0400
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv7839
Modified Files:
Tag: chrisw-dirview-branch
utils.py
Log Message:
attempt 3 for Unix/Windows FSDV interoperability.
=== CMF/CMFCore/utils.py 1.28.4.3 => 1.28.4.4 ===
--- CMF/CMFCore/utils.py:1.28.4.3 Mon Aug 19 11:56:47 2002
+++ CMF/CMFCore/utils.py Mon Aug 19 13:12:40 2002
@@ -607,7 +607,7 @@
#
security.declarePublic('normalize')
def normalize(p):
- return os_path.abspath(os_path.normcase(os_path.normpath(p)))
+ return os_path.abspath(os_path.normcase(os_path.normpath(p.replace('\\','/'))))
normINSTANCE_HOME = normalize(INSTANCE_HOME)
normSOFTWARE_HOME = normalize(SOFTWARE_HOME)
@@ -634,8 +634,9 @@
index = p.find('Products')
if index == -1:
index = p.find('products')
- if index != -1:
- p = p[index:]
+ if index == -1:
+ return p
+ p = p[index:]
while p[:1] in separators:
p = p[1:]
return p