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

Christian Zagrodnick cz@gocept.com
Mon, 13 Jan 2003 14:44:58 -0500


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

Modified Files:
      Tag: zagy-patches
	FSConnection.py 
Log Message:
- Assuring that you cannot create objects with forbidden IDs.


=== Products/AdaptableStorage/gateway_fs/FSConnection.py 1.6.2.1 => 1.6.2.2 ===
--- Products/AdaptableStorage/gateway_fs/FSConnection.py:1.6.2.1	Mon Jan 13 14:28:24 2003
+++ Products/AdaptableStorage/gateway_fs/FSConnection.py	Mon Jan 13 14:44:56 2003
@@ -275,6 +275,10 @@
             if non_containers.get(dir):
                 raise FSWriteError(
                     "Not a directory: %s" % dir)
+            if os.path.split(subpath)[1] in self.hidden_filenames:
+                raise FSWriteError(
+                    'The id %s is not allowed.' % (os.path.split(subpath)[1], ))
+                   
             if t == 'f':
                 non_containers[subpath] = 1
                 if not isinstance(sections[DATA_SECTION], StringType):