From 4706b8a9deb1dbe2c9cf60f891ad82ee7d4fc16b Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 13 Jul 2018 15:01:03 +0200 Subject: [PATCH] Store newly created pads in the correct (shared) folder --- www/common/cryptpad-common.js | 3 ++- www/common/proxy-manager.js | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 266402fcc..3011618cd 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -523,7 +523,8 @@ define([ if (common.initialPath) { if (!data.path) { - data.path = common.initialPath; + data.path = Array.isArray(common.initialPath) ? common.initialPath + : decodeURIComponent(common.initialPath).split(','); delete common.initialPath; } } diff --git a/www/common/proxy-manager.js b/www/common/proxy-manager.js index a89dfd206..f7bd3eb85 100644 --- a/www/common/proxy-manager.js +++ b/www/common/proxy-manager.js @@ -319,7 +319,6 @@ define([ }; // Add a folder/subfolder var _addSharedFolder = function (Env, data, cb) { - console.log(data); data = data || {}; var resolved = _resolvePath(Env, data.path); if (!resolved || !resolved.userObject) { return void cb({error: 'E_NOTFOUND'}); } @@ -628,10 +627,8 @@ define([ p = resolved.path; } var todo = function () { - console.log('here'); uo.pushData(pad, function (e, id) { if (e) { return void cb(e); } - console.log(id, p); uo.add(id, p); cb(); }); @@ -721,7 +718,6 @@ define([ }, cb); }; var addSharedFolderInner = function (Env, path, data, cb) { - console.log(data); return void Env.sframeChan.query("Q_DRIVE_USEROBJECT", { cmd: "addSharedFolder", data: {