From 667bef2a840951e7226a8cb2147734ba9ca5eb3c Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 21 Jul 2021 17:19:35 +0200 Subject: [PATCH] Fix links in shared folders --- www/common/outer/userObject.js | 6 ++++++ www/common/proxy-manager.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/www/common/outer/userObject.js b/www/common/outer/userObject.js index a12beacf9..257fa5001 100644 --- a/www/common/outer/userObject.js +++ b/www/common/outer/userObject.js @@ -253,6 +253,12 @@ define([ id = Number(id); // Find and maybe update existing pads with the same channel 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 (d.href) { d.href = exp.cryptor.encrypt(d.href); } var found = false; diff --git a/www/common/proxy-manager.js b/www/common/proxy-manager.js index fc42f8aae..01c22812c 100644 --- a/www/common/proxy-manager.js +++ b/www/common/proxy-manager.js @@ -22,11 +22,11 @@ define([ // a cached version if (Env.folders[id].offline && !lm.cache) { Env.folders[id].offline = false; + if (Env.folders[id].userObject.fixFiles) { Env.folders[id].userObject.fixFiles(); } Env.Store.refreshDriveUI(); } return; } - if (Env.folders[id]) { console.warn(Env.folders[id]); } var cfg = getConfig(Env); cfg.sharedFolder = true; cfg.id = id;