SVN: CMF/trunk/CMFCore/DirectoryView.py - minor code tweaking (entry_minimal_fp is only required for subdirs)

Yvo Schubbe <[email protected]>
Newsgroups gmane.comp.web.zope.cmf.cvs
Message-ID <[email protected]>
Log message for revision 69115:
  - minor code tweaking (entry_minimal_fp is only required for subdirs)

Changed:
  U   CMF/trunk/CMFCore/DirectoryView.py

-=-
Modified: CMF/trunk/CMFCore/DirectoryView.py
===================================================================
--- CMF/trunk/CMFCore/DirectoryView.py	2006-07-13 18:26:08 UTC (rev 69114)
+++ CMF/trunk/CMFCore/DirectoryView.py	2006-07-13 18:57:58 UTC (rev 69115)
@@ -178,11 +178,11 @@
         for entry in _filtered_listdir(self._filepath, ignore=self.ignore):
             if not self._isAllowableFilename(entry):
                 continue
-            entry_minimal_fp = '/'.join( (self._minimal_fp, entry) )
             entry_filepath = path.join(self._filepath, entry)
             if path.isdir(entry_filepath):
                 # Add a subdirectory only if it was previously registered,
                 # unless register_subdirs is set.
+                entry_minimal_fp = '/'.join( (self._minimal_fp, entry) )
                 info = registry.getDirectoryInfo(entry_minimal_fp)
                 if info is None and register_subdirs:
                     # Register unknown subdirs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.