Store newly created pads in the correct (shared) folder

pull/1/head
yflory 6 years ago
parent 6a80f49fe0
commit 4706b8a9de

@ -523,7 +523,8 @@ define([
if (common.initialPath) { if (common.initialPath) {
if (!data.path) { if (!data.path) {
data.path = common.initialPath; data.path = Array.isArray(common.initialPath) ? common.initialPath
: decodeURIComponent(common.initialPath).split(',');
delete common.initialPath; delete common.initialPath;
} }
} }

@ -319,7 +319,6 @@ define([
}; };
// Add a folder/subfolder // Add a folder/subfolder
var _addSharedFolder = function (Env, data, cb) { var _addSharedFolder = function (Env, data, cb) {
console.log(data);
data = data || {}; data = data || {};
var resolved = _resolvePath(Env, data.path); var resolved = _resolvePath(Env, data.path);
if (!resolved || !resolved.userObject) { return void cb({error: 'E_NOTFOUND'}); } if (!resolved || !resolved.userObject) { return void cb({error: 'E_NOTFOUND'}); }
@ -628,10 +627,8 @@ define([
p = resolved.path; p = resolved.path;
} }
var todo = function () { var todo = function () {
console.log('here');
uo.pushData(pad, function (e, id) { uo.pushData(pad, function (e, id) {
if (e) { return void cb(e); } if (e) { return void cb(e); }
console.log(id, p);
uo.add(id, p); uo.add(id, p);
cb(); cb();
}); });
@ -721,7 +718,6 @@ define([
}, cb); }, cb);
}; };
var addSharedFolderInner = function (Env, path, data, cb) { var addSharedFolderInner = function (Env, path, data, cb) {
console.log(data);
return void Env.sframeChan.query("Q_DRIVE_USEROBJECT", { return void Env.sframeChan.query("Q_DRIVE_USEROBJECT", {
cmd: "addSharedFolder", cmd: "addSharedFolder",
data: { data: {

Loading…
Cancel
Save