From b8d77fbb46e647eeb55f88bdadbac2ffc828d275 Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@allmydata.com>
Date: Mon, 17 Dec 2007 20:57:40 -0700
Subject: [PATCH] move my_private_dir.cap into private/

---
 src/allmydata/client.py           | 6 +++++-
 src/allmydata/test/test_system.py | 3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/allmydata/client.py b/src/allmydata/client.py
index 20747721..d250e1a1 100644
--- a/src/allmydata/client.py
+++ b/src/allmydata/client.py
@@ -120,7 +120,11 @@ class Client(node.Node, Referenceable, testutil.PollMixin):
         read-write mutable directory URI, then I create a new mutable
         directory and write its URI into that file.
         """
-        privdirfile = os.path.join(self.basedir, self.MY_PRIVATE_DIR_FILE)
+        # TODO: change this to use Node.get_or_create_private_config(). That
+        # will probably require passing a validation function in, or
+        # something.
+        privdirfile = os.path.join(self.basedir, "private",
+                                   self.MY_PRIVATE_DIR_FILE)
         if os.path.exists(privdirfile):
             try:
                 theuri = open(privdirfile, "r").read().strip()
diff --git a/src/allmydata/test/test_system.py b/src/allmydata/test/test_system.py
index ea928108..9f200dae 100644
--- a/src/allmydata/test/test_system.py
+++ b/src/allmydata/test/test_system.py
@@ -70,7 +70,8 @@ class SystemTest(testutil.SignalMixin, unittest.TestCase):
             if i == 0:
                 open(os.path.join(basedir, "webport"), "w").write("tcp:0:interface=127.0.0.1")
             if self.createprivdir:
-                open(os.path.join(basedir, "my_private_dir.cap"), "w")
+                fileutil.make_dirs(os.path.join(basedir, "private"))
+                open(os.path.join(basedir, "private", "my_private_dir.cap"), "w")
             open(os.path.join(basedir, "introducer.furl"), "w").write(self.introducer_furl)
             c = self.add_service(client.Client(basedir=basedir))
             self.clients.append(c)
-- 
2.45.2