[Zope3-checkins] CVS: Zope3/src/zope/fssync - fssync.py:1.22
Guido van Rossum
guido@python.org
Thu, 15 May 2003 15:48:03 -0400
Update of /cvs-repository/Zope3/src/zope/fssync
In directory cvs.zope.org:/tmp/cvs-serv24555
Modified Files:
fssync.py
Log Message:
When adding a file, leave the type and factory unspecified. The
newfangled IFileFactory feature will guess the type for us.
=== Zope3/src/zope/fssync/fssync.py 1.21 => 1.22 ===
--- Zope3/src/zope/fssync/fssync.py:1.21 Thu May 15 14:18:26 2003
+++ Zope3/src/zope/fssync/fssync.py Thu May 15 15:48:02 2003
@@ -419,12 +419,7 @@
entry["path"] = zpath
entry["flag"] = "added"
if isdir(path):
- entry["type"] = "zope.app.content.folder.Folder"
- else:
- # XXX Need to guess better based on extension
- entry["type"] = "zope.app.content.file.File"
- if "factory" not in entry:
- entry["factory"] = str(unicode(entry["type"]))
+ entry["type"] = entry["factory"] = "zope.app.content.folder.Folder"
self.metadata.flush()
def remove(self, path):