magic_readonly_cap = ""
def parseArgs(self, invite_code, local_dir):
BasedirOptions.parseArgs(self)
- self.local_dir = None if local_dir is None else argv_to_abspath(local_dir)
+
+ # Expand the path relative to the current directory of the CLI command, not the node.
+ self.local_dir = None if local_dir is None else argv_to_abspath(local_dir, long_path=False)
self.invite_code = to_str(argv_to_unicode(invite_code))
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")