-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/02/2011 05:30 PM, Nikolay Kim wrote:

> Modified: Products.CMFCore/trunk/Products/CMFCore/DirectoryView.py
> ===================================================================
> --- Products.CMFCore/trunk/Products/CMFCore/DirectoryView.py  2011-02-02 
> 22:30:34 UTC (rev 120067)
> +++ Products.CMFCore/trunk/Products/CMFCore/DirectoryView.py  2011-02-02 
> 22:30:48 UTC (rev 120068)
> @@ -106,7 +106,6 @@
>  class DirectoryInformation:
>      data = None
>      _v_last_read = 0
> -    _v_last_filelist = [] # Only used on Win32
>  
>      def __init__(self, filepath, reg_key, ignore=ignore):
>          self._filepath = filepath
> @@ -159,23 +158,13 @@
>          if not Globals.DevelopmentMode:
>              return 0
>          mtime=0
> -        filelist=[]
>          try:
>              mtime = os.stat(self._filepath)[8]
> -            if platform == 'win32':
> -                # 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
> -                os.path.walk(self._filepath, self._walker, filelist)
> -                filelist.sort()
>          except:
>              logger.exception("Error checking for directory modification")
>  
> -        if mtime != self._v_last_read or filelist != self._v_last_filelist:
> +        if mtime != self._v_last_read:
>              self._v_last_read = mtime
> -            self._v_last_filelist = filelist
> -
>              return 1
>  
>          return 0

Nikolay,

The code you removed was there to prevent very real problems some people
experienced when running on Windows in development mode:  are you sure
that such users have all moved on to modern enough versions to make this
change a better tradeoff?

Maybe we should allow restoring the "safe but slow" behavior with an
environment variable?


Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          tsea...@palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1J5MEACgkQ+gerLs4ltQ786wCgkPLelxT0eoCVGDtfnBEdRNzv
GXQAmgNOj4Tf1Y8Tcw9ov/8NTvfRke16
=GSUZ
-----END PGP SIGNATURE-----

_______________________________________________
Zope-CMF maillist  -  Zope-CMF@zope.org
https://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Reply via email to