mirror of https://github.com/xwiki-labs/cryptpad
Store newly created pads in the correct (shared) folder
This commit is contained in:
parent
6a80f49fe0
commit
4706b8a9de
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue