from allmydata.frontends import drop_upload
dbfile = os.path.join(self.basedir, "private", "magicfolderdb.sqlite")
dbfile = abspath_expanduser_unicode(dbfile)
- s = drop_upload.DropUploader(self, upload_dircap, '', local_dir, dbfile)
+
+ magic_folder_parent_dircap = os.path.join(self.basedir, "private", "magic_folder_parent_dircap")
+ magic_folder_parent_dircap = abspath_expanduser_unicode(magic_folder_parent_dircap)
+ fh = open(magic_folder_parent_dircap, "r")
+ parent_dircap = fh.read().strip()
+
+ s = drop_upload.DropUploader(self, upload_dircap, parent_dircap, local_dir, dbfile)
s.setServiceParent(self)
s.startService()
fileutil.write(os.path.join(basedir1, "tahoe.cfg"), config)
fileutil.write(os.path.join(basedir1, "private", "drop_upload_dircap"), "URI:DIR2:blah")
+ fileutil.write(os.path.join(basedir1, "private", "magic_folder_parent_dircap"), "URI:DIR2:meow")
self.failUnlessRaises(MissingConfigEntry, client.Client, basedir1)
fileutil.write(os.path.join(basedir1, "tahoe.cfg"),
"enabled = true\n" +
"local.directory = " + local_dir_utf8 + "\n")
fileutil.write(os.path.join(basedir2, "private", "drop_upload_dircap"), "URI:DIR2:blah")
+ fileutil.write(os.path.join(basedir2, "private", "magic_folder_parent_dircap"), "URI:DIR2:meow")
c2 = client.Client(basedir2)
self.failUnlessRaises(KeyError, c2.getServiceNamed, 'drop-upload')
self.failUnless([True for arg in logged_messages if "Boom" in arg],