From e1cd972679dbc909e19fcf4d91905dda038cb8cb Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 1 Oct 2018 14:46:42 +0200 Subject: [PATCH] add folderIsReadOnly --- bin/remixd | 2 +- src/services/sharedFolder.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/remixd b/bin/remixd index ad3c02ece2..2dc24c632a 100755 --- a/bin/remixd +++ b/bin/remixd @@ -55,7 +55,7 @@ if (program.sharedFolder) { var sharedFolderrouter = new Router(65520, servicesList['sharedfolder'], { remixIdeUrl: program.remixIde }, (webSocket) => { servicesList['sharedfolder'].setWebSocket(webSocket) servicesList['sharedfolder'].setupNotifications(program.sharedFolder) - servicesList['sharedfolder'].sharedFolder(program.sharedFolder, program.readOnly) + servicesList['sharedfolder'].sharedFolder(program.sharedFolder, program.readOnly || false) }) killCallBack.push(sharedFolderrouter.start()) } diff --git a/src/services/sharedFolder.js b/src/services/sharedFolder.js index 0965dcb400..c0808cd372 100644 --- a/src/services/sharedFolder.js +++ b/src/services/sharedFolder.js @@ -38,6 +38,10 @@ module.exports = { } }, + folderIsReadOnly: function (args, cb) { + return cb(null, this.readOnly) + }, + get: function (args, cb) { var path = utils.absolutePath(args.path, this.sharedFolder) if (!fs.existsSync(path)) {