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

Shane Hathaway shane at zope.com
Sat Apr 3 11:55:32 EST 2004


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

Modified Files:
      Tag: CMF-1_4-branch
	DirectoryView.py 
Log Message:
There's no need to pay the os.walk penalty except on Windows.


=== CMF/CMFCore/DirectoryView.py 1.38 => 1.38.4.1 ===
--- CMF/CMFCore/DirectoryView.py:1.38	Mon Mar 24 00:03:08 2003
+++ CMF/CMFCore/DirectoryView.py	Sat Apr  3 11:55:31 2004
@@ -111,12 +111,13 @@
             try:
                 fp = expandpath(self.filepath)
                 mtime = stat(fp)[8]
-                # some Windows directories don't change mtime 
-                # when a file is added to or deleted from them :-(
-                # So keep a list of files as well, and see if that
-                # changes
-                path.walk(fp,_walker,filelist)
-                filelist.sort()
+                if sys.platform == 'nt':
+                    # some Windows directories don't change mtime 
+                    # when a file is added to or deleted from them :-(
+                    # So keep a list of files as well, and see if that
+                    # changes
+                    path.walk(fp,_walker,filelist)
+                    filelist.sort()
             except: 
                 LOG('DirectoryView',
                     ERROR,




More information about the CMF-checkins mailing list