Commit 8eb9ac20 authored by yann300's avatar yann300

ensure we know if a file exists

parent 32708b8a
...@@ -12,6 +12,7 @@ function buildList (self, path = '', callback) { ...@@ -12,6 +12,7 @@ function buildList (self, path = '', callback) {
if (!counter) callback(null, fileTree) if (!counter) callback(null, fileTree)
for (var i = 0, name, len = counter; i < len; i++) { for (var i = 0, name, len = counter; i < len; i++) {
name = list[i] name = list[i]
self.files[path] = path
if (filesList[name].isDirectory) { if (filesList[name].isDirectory) {
setFolder(self, path, name, fileTree, finish) setFolder(self, path, name, fileTree, finish)
} else { } else {
...@@ -56,6 +57,7 @@ module.exports = class SharedFolder { ...@@ -56,6 +57,7 @@ module.exports = class SharedFolder {
this.error = { 'EEXIST': 'File already exists' } this.error = { 'EEXIST': 'File already exists' }
this._isReady = false this._isReady = false
this.filesContent = {} this.filesContent = {}
this.files = {}
remixd.event.register('notified', (data) => { remixd.event.register('notified', (data) => {
if (data.scope === 'sharedfolder') { if (data.scope === 'sharedfolder') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment