[Zope-CVS] CVS: Products/AdaptableStorage/gateway_fs - FSConnection.py:1.16

Shane Hathaway shane@zope.com
Tue, 4 Mar 2003 23:58:34 -0500


Update of /cvs-repository/Products/AdaptableStorage/gateway_fs
In directory cvs.zope.org:/tmp/cvs-serv3065/gateway_fs

Modified Files:
	FSConnection.py 
Log Message:
Don't assume the metadata prefix is always 1 character.


=== Products/AdaptableStorage/gateway_fs/FSConnection.py 1.15 => 1.16 ===
--- Products/AdaptableStorage/gateway_fs/FSConnection.py:1.15	Tue Mar  4 23:25:01 2003
+++ Products/AdaptableStorage/gateway_fs/FSConnection.py	Tue Mar  4 23:58:31 2003
@@ -75,8 +75,9 @@
 
 
     def _isLegalFilename(self, fn):
+        mp = self.metadata_prefix
         if (not fn or
-            (fn.startswith(self.metadata_prefix) and metadata_re.match(fn, 1))
+            (fn.startswith(mp) and metadata_re.match(fn, len(mp)))
             or self.hidden_re.match(fn) is not None):
             return 0
         return 1