[CMF-checkins] CVS: CMF/CMFCore - DirectoryView.py:1.14

Ken Manheimer klm@zope.com
Mon, 26 Nov 2001 17:01:26 -0500


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

Modified Files:
	DirectoryView.py 
Log Message:
Enable use of Data.fs from unix on windows: when normalizing paths, do
more to normalize for the platform.  (We'll need to add a bit more to
work in the other direction.)

.registerDirectoryByPath(): Use the normalized path.


=== CMF/CMFCore/DirectoryView.py 1.13 => 1.14 ===
     def registerDirectoryByPath(self, filepath, subdirs=1):
         fp = minimalpath(filepath)
-        self._directories[fp] = di = DirectoryInformation(filepath, fp)
+        normfilepath = path.normpath(filepath)
+        self._directories[fp] = di = DirectoryInformation(normfilepath, fp)
         if subdirs:
             for entry in di.getSubdirs():
-                e_filepath = path.join(filepath, entry)
+                e_filepath = path.join(normfilepath, entry)
                 self.registerDirectoryByPath(e_filepath, subdirs)
 
     def reloadDirectory(self, filepath):