You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 6, 2021. It is now read-only.
In localfs.js#L343 there is an issue where the callback is called with an error but no meta object.
In the callback error case meta.stream is accessed. Since meta is undefined, this throws, making the entire point of a callback for the error case meaningless. (and as it so happens, this crashes my c9 install)
varcallback=function(err,meta){if(called){if(err){if(meta.stream)meta.stream.emit("error",err);elseconsole.error(err.stack);}elseif(meta.stream)meta.stream.emit("saved");return;}called=true;returnrealCallback.apply(this,arguments);};if(options.stream&&!options.stream.readable){returncallback(newTypeError("options.stream must be readable."));}
Changing that like the following should fix this.
varcallback=function(err,meta){if(called){if(err){if(meta&&meta.stream)meta.stream.emit("error",err);elseconsole.error(err.stack);}elseif(meta&&meta.stream)meta.stream.emit("saved");return;}called=true;returnrealCallback.apply(this,arguments);};if(options.stream&&!options.stream.readable){returncallback(newTypeError("options.stream must be readable."));}