From b5a58e3e0b1b54c02dacf7983448bd75dc52298a Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 12 Nov 2019 17:38:00 +0100 Subject: [PATCH] Don't deprecate read-only shared folders --- www/common/outer/userObject.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/www/common/outer/userObject.js b/www/common/outer/userObject.js index 6ba0cd6d2..868e623de 100644 --- a/www/common/outer/userObject.js +++ b/www/common/outer/userObject.js @@ -113,9 +113,13 @@ define([ }; exp.deprecateSharedFolder = function (id) { + if (readOnly) { return; } var data = files[SHARED_FOLDERS][id]; if (!data) { return; } - files[SHARED_FOLDERS_TEMP][id] = JSON.parse(JSON.stringify(data)); + var ro = !data.href || exp.cryptor.decrypt(data.href).indexOf('#') === -1; + if (!ro) { + files[SHARED_FOLDERS_TEMP][id] = JSON.parse(JSON.stringify(data)); + } var paths = exp.findFile(Number(id)); exp.delete(paths, null, true); delete files[SHARED_FOLDERS][id];