Merge pull request #57 from ethereum/AddfolderIsReadOnly

add folderIsReadOnly
pull/454/head
yann300 6 years ago committed by GitHub
commit 02c8466eb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      bin/remixd
  2. 4
      src/services/sharedFolder.js

@ -55,7 +55,7 @@ if (program.sharedFolder) {
var sharedFolderrouter = new Router(65520, servicesList['sharedfolder'], { remixIdeUrl: program.remixIde }, (webSocket) => { var sharedFolderrouter = new Router(65520, servicesList['sharedfolder'], { remixIdeUrl: program.remixIde }, (webSocket) => {
servicesList['sharedfolder'].setWebSocket(webSocket) servicesList['sharedfolder'].setWebSocket(webSocket)
servicesList['sharedfolder'].setupNotifications(program.sharedFolder) servicesList['sharedfolder'].setupNotifications(program.sharedFolder)
servicesList['sharedfolder'].sharedFolder(program.sharedFolder, program.readOnly) servicesList['sharedfolder'].sharedFolder(program.sharedFolder, program.readOnly || false)
}) })
killCallBack.push(sharedFolderrouter.start()) killCallBack.push(sharedFolderrouter.start())
} }

@ -38,6 +38,10 @@ module.exports = {
} }
}, },
folderIsReadOnly: function (args, cb) {
return cb(null, this.readOnly)
},
get: function (args, cb) { get: function (args, cb) {
var path = utils.absolutePath(args.path, this.sharedFolder) var path = utils.absolutePath(args.path, this.sharedFolder)
if (!fs.existsSync(path)) { if (!fs.existsSync(path)) {

Loading…
Cancel
Save