[Zope3-checkins] CVS: Zope3/src/zope/app/fssync - committer.py:1.9

Guido van Rossum guido@python.org
Thu, 5 Jun 2003 14:50:57 -0400


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

Modified Files:
	committer.py 
Log Message:
The code used when using an explicit factory was incomplete -- it
didn't set the data!  With unit tests.


=== Zope3/src/zope/app/fssync/committer.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/fssync/committer.py:1.8	Tue Jun  3 13:08:52 2003
+++ Zope3/src/zope/app/fssync/committer.py	Thu Jun  5 14:50:57 2003
@@ -315,6 +315,10 @@
         # A given factory overrides everything
         factory = resolve(factory_name)
         obj = factory()
+        adapter = get_adapter(obj)
+        if IObjectFile.isImplementedBy(adapter):
+            data = read_file(fspath)
+            adapter.setBody(data)
     else:
         # No factory; try using IFileFactory or IDirectoryFactory
         as = getService(container, "Adapters")