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

Guido van Rossum guido@python.org
Tue, 13 May 2003 15:58:57 -0400


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

Modified Files:
	syncer.py 
Log Message:
Support for removing files.


=== Zope3/src/zope/app/fssync/syncer.py 1.13 => 1.14 ===
--- Zope3/src/zope/app/fssync/syncer.py:1.13	Tue May 13 15:50:49 2003
+++ Zope3/src/zope/app/fssync/syncer.py	Tue May 13 15:58:56 2003
@@ -187,7 +187,12 @@
 
     # See if this is an existing object
     if name in container:
-        # Yup, let's see if we have the same kind of object
+        # Yup, let's see if we need to delete it
+        if entry.get("flag") == "removed":
+            del container[name]
+            return # That was easy!
+
+        # No, updating.  Let's see if we have the same kind of object
 
         # Get the object adapter
         ob = container[name]