From 13400e24ac05c899ecf1d294a6876d5723174f19 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 28 Jun 2007 10:59:51 -0700 Subject: [PATCH] vdrive: make sure we really record global/private root directory uris --- src/allmydata/vdrive.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/allmydata/vdrive.py b/src/allmydata/vdrive.py index b231a84f..aa22aaad 100644 --- a/src/allmydata/vdrive.py +++ b/src/allmydata/vdrive.py @@ -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) -- 2.45.2