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

Chris Withers lists at simplistix.co.uk
Mon Apr 5 05:40:57 EDT 2004


Hurm :-S

I'm pretty sure I experienced the problem here on both Linux and Windows, so the 
comment may be out of date.

Did all the tests pass on box Linux and Windows after this change?

I suspect problems may be due to the timing differences on Windows and Linux, 
but this is digging way back into the past. All my memory is telling me is 
"tweaking this may cause pain and suffering"...

Chris

Shane Hathaway wrote:

> 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,
> 
> 
> _______________________________________________
> CMF-checkins mailing list
> CMF-checkins at zope.org
> http://mail.zope.org/mailman/listinfo/cmf-checkins
> 

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk




More information about the CMF-checkins mailing list