|
|
|
@ -856,10 +856,17 @@ define([
|
|
|
|
|
pad.href = href;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// If we've just accepted ownership for a pad stored in a shared folder,
|
|
|
|
|
// we need to make a copy of this pad in our drive. We're going to check
|
|
|
|
|
// the pad is owned by us BUT is not stored in our main drive
|
|
|
|
|
var inMyDrive = datas.some(function (obj) {
|
|
|
|
|
return !obj.fId;
|
|
|
|
|
});
|
|
|
|
|
var ownedByMe = Array.isArray(owners) && owners.indexOf(store.proxy.edPublic) !== -1;
|
|
|
|
|
|
|
|
|
|
// Add the pad if it does not exist in our drive
|
|
|
|
|
if (!contains) {
|
|
|
|
|
if (!contains || (ownedByMe && !inMyDrive)) {
|
|
|
|
|
var autoStore = Util.find(store.proxy, ['settings', 'general', 'autostore']);
|
|
|
|
|
var ownedByMe = Array.isArray(owners) && owners.indexOf(store.proxy.edPublic) !== -1;
|
|
|
|
|
if (autoStore !== 1 && !data.forceSave && !data.path && !ownedByMe) {
|
|
|
|
|
// send event to inner to display the corner popup
|
|
|
|
|
postMessage(clientId, "AUTOSTORE_DISPLAY_POPUP", {
|
|
|
|
|