[CMF-checkins] CVS: CMF/CMFCore - DirectoryView.py:1.16.22.2
Chris Withers
chrisw@nipltd.com
Fri, 25 Jan 2002 07:23:46 -0500
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv27686
Modified Files:
Tag: ChrisW-DirectoryView_fix-branch
DirectoryView.py
Log Message:
Tests now pass both normally andwhen Z_DEBUG_MODE=1
=== CMF/CMFCore/DirectoryView.py 1.16.22.1 => 1.16.22.2 ===
if Globals.DevelopmentMode and os.name=='nt':
-
+
def _changed(self):
mtime=0
filelist=[]
try:
fp = expandpath(self.filepath)
mtime = stat(fp)[8]
- # Windows directories don't change mtime when a file
- # in them changes :-(
+ # some Windows directories don't change mtime
+ # when a file in them changes :-(
# So keep a list of files as well, and see if that
# changes
path.walk(fp,_walker,filelist)
@@ -119,8 +119,9 @@
if mtime != self._v_last_read or filelist != self._v_last_filelist:
self._v_last_read = mtime
self._v_last_filelist = filelist
+
return 1
-
+
return 0
elif Globals.DevelopmentMode:
@@ -134,7 +135,7 @@
return 0
else:
-
+
def _changed(self):
return 0
@@ -143,7 +144,7 @@
if self.data is None or changed:
try:
self.data, self.objects = self.prepareContents(registry,
- register_subdirs=fish)
+ register_subdirs=changed)
except:
LOG('DirectoryView',
ERROR,
@@ -207,6 +208,7 @@
t = registry.getTypeByMetaType(mt)
if t is None:
t = registry.getTypeByExtension(ext)
+
if t is not None:
try:
ob = t(name, e_filepath, fullname=entry)