John Yani
John Yani
The bug is somewhere here: https://github.com/airportyh/fireworm/blob/master/lib/dir.js#L57 It's possible that there's some sort of race condition. Do we need to use some sort of mutex here?
Yeah, so if `entryNames` contains multiple duplicates, multiple `fs.stat` would be called, resulting in multiple emit signals.
i.e., you need to use the sync version of `fs.stat` to avoid the bug.
Here's a simpler code that demonstrates a problem. ``` javascript Array.prototype.includes = function(el) { return !(this.indexOf(el) == -1); } ``` In the synchronous mode nothing unusual happens: ``` javascript var...
Ok, noticed this: https://github.com/airportyh/fireworm/blob/master/lib/dir.js#L110 So the bug isn't there. The bug is that there's no such check for directories, so they're added twice, resulting in duplicate files.
> If you use your own volume attribute during run or similar, it will use that and not the one in the Dockerfile. If it should, then it is a...
That's what I'm asking about? What this callback is doing?
The callback isn't called on error either. Notice return.
@airportyh could you please review it again?
@airportyh :sun_with_face: