Merge pull request #983 from ethereum/fixReadonlyonremixd

Fix readonly file on remixd
pull/1/head
yann300 7 years ago committed by GitHub
commit 6a104702f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/app/files/shared-folder.js

@ -12,6 +12,7 @@ function buildList (self, path = '', callback) {
if (!counter) callback(null, fileTree)
for (var i = 0, name, len = counter; i < len; i++) {
name = list[i]
self.files[path] = path
if (filesList[name].isDirectory) {
setFolder(self, path, name, fileTree, finish)
} else {
@ -56,6 +57,7 @@ module.exports = class SharedFolder {
this.error = { 'EEXIST': 'File already exists' }
this._isReady = false
this.filesContent = {}
this.files = {}
remixd.event.register('notified', (data) => {
if (data.scope === 'sharedfolder') {
@ -145,8 +147,7 @@ module.exports = class SharedFolder {
}
isReadOnly (path) {
if (this.files) return this.files[path]
return true
return false // TODO: add a callback here to allow calling remixd
}
remove (path) {

Loading…
Cancel
Save