diff options
Diffstat (limited to 'packages/meshbay-client/src/main.js')
| -rw-r--r-- | packages/meshbay-client/src/main.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/packages/meshbay-client/src/main.js b/packages/meshbay-client/src/main.js index cbaabc4..0020084 100644 --- a/packages/meshbay-client/src/main.js +++ b/packages/meshbay-client/src/main.js @@ -2218,7 +2218,16 @@ function registerBridge() { await confirmFolder(body.path); return ['POST', target, body]; }, - updateRoot: (a) => ['PATCH', root(a), anObject(a.updates)], + // Opening a folder to writes from every member is asked like sharing it; + // closing it, or the removable flag, only narrows. + updateRoot: async (a) => { + const updates = anObject(a.updates); + if (updates.writable === true) { + await confirmOrRefuse('native.root_writable_confirm', + { name: aText(a.rootName, 'the folder name') }); + } + return ['PATCH', root(a), updates]; + }, ejectRoot: (a) => ['PUT', `${root(a)}/eject`], plugRoot: (a) => ['PUT', `${root(a)}/plug`], removeRoot: (a) => ['DELETE', root(a)], |