[Zope3-checkins] CVS: Zope3/src/zope/app/fssync - syncer.py:1.23

Guido van Rossum guido@python.org
Wed, 28 May 2003 13:29:51 -0400


Update of /cvs-repository/Zope3/src/zope/app/fssync
In directory cvs.zope.org:/tmp/cvs-serv27647

Modified Files:
	syncer.py 
Log Message:
When creating a directory, always create its @@Zope and an empty
Entries.xml.


=== Zope3/src/zope/app/fssync/syncer.py 1.22 => 1.23 ===
--- Zope3/src/zope/app/fssync/syncer.py:1.22	Wed May 28 11:46:08 2003
+++ Zope3/src/zope/app/fssync/syncer.py	Wed May 28 13:29:50 2003
@@ -133,12 +133,13 @@
     else:
         # Directory
         assert IObjectDirectory.isImplementedBy(adapter)
-        if os.path.exists(path):
-            dir_entries = os.path.join(path, '@@Zope', 'Entries.xml')
-            if os.path.exists(dir_entries):
-                dumpFile({}, dir_entries)
-        else:
+        if not os.path.exists(path):
             os.mkdir(path)
+        admin_dir = os.path.join(path, '@@Zope')
+        if not os.path.exists(admin_dir):
+            os.mkdir(admin_dir)
+        dir_entries = os.path.join(admin_dir, 'Entries.xml')
+        dumpFile({}, dir_entries)
 
         for cname, cob in adapter.contents():
             toFS(cob, cname, path)