From 9a6fa4cbe2d46ffc8591d2153ab8dbdc962f9d7b Mon Sep 17 00:00:00 2001 From: yflory Date: Sat, 28 Jul 2018 08:58:16 +0200 Subject: [PATCH] Create a copy when uploading an owned file in a shared folder --- www/common/outer/async-store.js | 3 +++ www/common/outer/upload.js | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index 6536abdf2..4cb0503bb 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -731,6 +731,9 @@ define([ if (channelData && channelData.wc && channel === channelData.wc.id) { owners = channelData.data.owners || undefined; } + if (data.owners) { + owners = data.owners; + } var expire; if (channelData && channelData.wc && channel === channelData.wc.id) { diff --git a/www/common/outer/upload.js b/www/common/outer/upload.js index ef571af57..25029ed69 100644 --- a/www/common/outer/upload.js +++ b/www/common/outer/upload.js @@ -92,7 +92,8 @@ define([ href: href, path: path, password: password, - channel: id + channel: id, + owners: metadata.owners }; common.setPadTitle(data, function (err) { if (err) { return void console.error(err); }