]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
vdrive: make sure we really record global/private root directory uris
authorBrian Warner <warner@allmydata.com>
Thu, 28 Jun 2007 17:59:51 +0000 (10:59 -0700)
committerBrian Warner <warner@allmydata.com>
Thu, 28 Jun 2007 17:59:51 +0000 (10:59 -0700)
src/allmydata/vdrive.py

index b231a84f24cb517fec2f85edcb3219b094e51063..aa22aaada6b288ea9228b2aa662ff4b8b1a47b52 100644 (file)
@@ -50,21 +50,23 @@ class VirtualDrive(service.MultiService):
                           vdrive_server.callRemote("get_public_root_uri"))
             def _got_global_uri(global_uri):
                 self._global_uri = global_uri
+                f = open(global_uri_file, "w")
+                f.write(self._global_uri + "\n")
+                f.close()
             d.addCallback(_got_global_uri)
 
         private_uri_file = os.path.join(basedir,
                                         self.MY_VDRIVE_URI_FILE)
         if os.path.exists(private_uri_file):
             f = open(private_uri_file)
-            private_vdrive_uri = f.read().strip()
+            self._private_uri = f.read().strip()
             f.close()
         elif global_vdrive_furl:
             d = dirnode.create_directory(client, global_vdrive_furl)
             def _got_directory(dirnode):
-                private_uri = dirnode.get_uri()
-                self._private_uri = private_uri
+                self._private_uri = dirnode.get_uri()
                 f = open(private_uri_file, "w")
-                f.write(private_uri + "\n")
+                f.write(self._private_uri + "\n")
                 f.close()
             d.addCallback(_got_directory)