]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Append magic-folder config options to tahoe.cfg
authorDavid Stainton <dstainton415@gmail.com>
Tue, 23 Jun 2015 08:01:48 +0000 (01:01 -0700)
committerDaira Hopwood <daira@jacaranda.org>
Mon, 20 Jul 2015 23:42:34 +0000 (00:42 +0100)
src/allmydata/scripts/magic_folder_cli.py

index 99cb7115e3f3aee902eb060250a5e01be5c44725..58f13e152f8779246c594a3dfa001406ca58def9 100644 (file)
@@ -128,8 +128,10 @@ def join(options):
     collective_readcap_file = os.path.join(options["node-directory"], "private/collective_dircap")
     fileutil.write(collective_readcap_file, magic_readonly_cap)
 
-    # Edit the client's tahoe.cfg to set [magic_folder] enabled = True and [magic_folder] local.directory = LOCAL_DIR.
-    # ...
+    c = open(os.path.join(options["node-directory"], "tahoe.cfg"), "a")
+    c.write("[magic_folder]\nenabled = True\n[magic_folder]\nlocal.directory = %s\n" % (options.local_dir,))
+    c.close()
+
 
 class MagicFolderCommand(BaseOptions):
     subCommands = [