[Zope3-checkins] CVS: Zope3/src/zope/fssync - fssync.py:1.39

Fred L. Drake, Jr. fred at zope.com
Mon Aug 11 11:55:07 EDT 2003


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

Modified Files:
	fssync.py 
Log Message:
saverooturl():  Make sure the @@Zope directory exists
findrooturl():  Remove unnecessary local variable


=== Zope3/src/zope/fssync/fssync.py 1.38 => 1.39 ===
--- Zope3/src/zope/fssync/fssync.py:1.38	Fri Aug  8 17:45:01 2003
+++ Zope3/src/zope/fssync/fssync.py	Mon Aug 11 10:55:01 2003
@@ -93,8 +93,12 @@
         <target>/@@Zope must already exist.
         """
         if self.rooturl:
+            dir = join(target, "@@Zope")
+            if not os.path.exists(dir):
+                os.mkdir(dir)
+            fn = join(dir, "Root")
             self.writefile(self.rooturl + "\n",
-                           join(target, "@@Zope", "Root"))
+                           fn)
 
     def findrooturl(self, target):
         """Find the root url for the given target.
@@ -107,8 +111,7 @@
         """
         dir = realpath(target)
         while dir:
-            zopedir = join(dir, "@@Zope")
-            rootfile = join(zopedir, "Root")
+            rootfile = join(dir, "@@Zope", "Root")
             try:
                 data = self.readfile(rootfile)
             except IOError:




More information about the Zope3-Checkins mailing list