[CMF-checkins] CVS: CMF/CMFCore - utils.py:1.28.4.2

Chris Withers chrisw@nipltd.com
Mon, 19 Aug 2002 08:40:05 -0400


Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv13185/CMFCore

Modified Files:
      Tag: chrisw-dirview-branch
	utils.py 
Log Message:
temp fix to get tests passing.

=== CMF/CMFCore/utils.py 1.28.4.1 => 1.28.4.2 ===
--- CMF/CMFCore/utils.py:1.28.4.1	Mon Aug 12 08:16:11 2002
+++ CMF/CMFCore/utils.py	Mon Aug 19 08:40:04 2002
@@ -633,9 +633,15 @@
     #      functionality (e.g., PRODUCTS_PATH), and adds a new requirement
     #      (that 'p' include 'Products').  Reverting head to 1.26.
     p = os_path.abspath(p)
-    #abs = normalize(p)
-    p = p[p.index('Products'):]
+    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 = p[p.find('Products'):]
     while p[:1] in separators:
         p = p[1:]
     return p
-