[Zope3-checkins] CVS: Zope3/src/zope/fssync - merger.py:1.8
Guido van Rossum
guido@python.org
Wed, 14 May 2003 18:24:42 -0400
Update of /cvs-repository/Zope3/src/zope/fssync
In directory cvs.zope.org:/tmp/cvs-serv9739
Modified Files:
merger.py
Log Message:
Always make sure the Original directory exists before copying to an
original file.
=== Zope3/src/zope/fssync/merger.py 1.7 => 1.8 ===
--- Zope3/src/zope/fssync/merger.py:1.7 Wed May 14 18:16:09 2003
+++ Zope3/src/zope/fssync/merger.py Wed May 14 18:24:42 2003
@@ -167,6 +167,7 @@
f.write(output)
finally:
f.close()
+ fsutil.ensuredir(dirname(original))
shutil.copy(remote, original)
self.getentry(local).update(self.getentry(remote))
self.clearflag(local)
@@ -177,6 +178,7 @@
return "Modified"
def merge_files_fix(self, local, original, remote):
+ fsutil.ensuredir(dirname(original))
shutil.copy(remote, original)
self.clearflag(local)
self.getentry(local).update(self.getentry(remote))