[CMF-checkins] CVS: CMF/CMFCore - utils.py:1.27 DirectoryView.py:1.27
Chris Withers
chrisw@nipltd.com
Mon, 5 Aug 2002 10:23:41 -0400
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv28775/CMFCore
Modified Files:
utils.py DirectoryView.py
Log Message:
Hopefully fixed problems with DirectoryView's beign created on one platform and then imported from a .zexp on another.
=== CMF/CMFCore/utils.py 1.26 => 1.27 ===
# Trims INSTANCE_HOME or SOFTWARE_HOME from a path.
p = os_path.abspath(p)
abs = normalize(p)
- l = len(normINSTANCE_HOME)
- if abs[:l] != normINSTANCE_HOME:
- l = len(normSOFTWARE_HOME)
- if abs[:l] != normSOFTWARE_HOME:
- # Can't minimize.
- return p
- p = p[l:]
+ p = abs[abs.index('products'):]
while p[:1] in separators:
p = p[1:]
return p
+
=== CMF/CMFCore/DirectoryView.py 1.26 => 1.27 ===
def getDirectoryInfo(self, filepath):
# Can return None.
- return self._directories.get(os.path.normpath(filepath), None)
+ return self._directories.get(minimalpath(filepath), None)
def listDirectories(self):
dirs = self._directories.keys()