From 80d8291b798defe0ed9a91e09cef77e1d10fb904 Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Fri, 23 Oct 2015 22:05:34 +0100 Subject: [PATCH] Don't include [magic_folder]enabled and local.directory fields by default. Add a comment reminding to do the field modification properly. Signed-off-by: Daira Hopwood --- src/allmydata/scripts/create_node.py | 6 +++--- src/allmydata/scripts/magic_folder_cli.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/allmydata/scripts/create_node.py b/src/allmydata/scripts/create_node.py index 5ba56eeb..511fb643 100644 --- a/src/allmydata/scripts/create_node.py +++ b/src/allmydata/scripts/create_node.py @@ -153,12 +153,12 @@ def create_node(config, out=sys.stdout, err=sys.stderr): c.write("enabled = false\n") c.write("\n") - c.write("[drop_upload]\n") + c.write("[magic_folder]\n") c.write("# Shall this node automatically upload files created or modified in a local directory?\n") - c.write("enabled = false\n") + c.write("#enabled = false\n") c.write("# To specify the target of uploads, a mutable directory writecap URI must be placed\n" "# in '%s'.\n" % os.path.join('private', 'magic_folder_dircap')) - c.write("local.directory = ~/drop_upload\n") + c.write("#local.directory = \n") c.write("\n") c.close() diff --git a/src/allmydata/scripts/magic_folder_cli.py b/src/allmydata/scripts/magic_folder_cli.py index a9787a15..8be94c92 100644 --- a/src/allmydata/scripts/magic_folder_cli.py +++ b/src/allmydata/scripts/magic_folder_cli.py @@ -152,6 +152,8 @@ def join(options): fileutil.write(dmd_cap_file, dmd_write_cap) fileutil.write(collective_readcap_file, magic_readonly_cap) + + # FIXME: modify any existing [magic_folder] fields, rather than appending. fileutil.write(os.path.join(options["node-directory"], u"tahoe.cfg"), "[magic_folder]\nenabled = True\nlocal.directory = %s\n" % (options.local_dir.encode('utf-8'),), mode="ab") -- 2.45.2