Fix links in shared folders

pull/1/head
yflory 3 years ago
parent 4e6ff7716f
commit 667bef2a84

@ -253,6 +253,12 @@ define([
id = Number(id); id = Number(id);
// Find and maybe update existing pads with the same channel id // Find and maybe update existing pads with the same channel id
var d = data[id]; var d = data[id];
// If we were given a static link, copy to STATIC_DATA
if (d.static) {
delete d.static;
files[STATIC_DATA][id] = d;
return;
}
// If we were given an edit link, encrypt its value if needed // If we were given an edit link, encrypt its value if needed
if (d.href) { d.href = exp.cryptor.encrypt(d.href); } if (d.href) { d.href = exp.cryptor.encrypt(d.href); }
var found = false; var found = false;

@ -22,11 +22,11 @@ define([
// a cached version // a cached version
if (Env.folders[id].offline && !lm.cache) { if (Env.folders[id].offline && !lm.cache) {
Env.folders[id].offline = false; Env.folders[id].offline = false;
if (Env.folders[id].userObject.fixFiles) { Env.folders[id].userObject.fixFiles(); }
Env.Store.refreshDriveUI(); Env.Store.refreshDriveUI();
} }
return; return;
} }
if (Env.folders[id]) { console.warn(Env.folders[id]); }
var cfg = getConfig(Env); var cfg = getConfig(Env);
cfg.sharedFolder = true; cfg.sharedFolder = true;
cfg.id = id; cfg.id = id;

Loading…
Cancel
Save