Merge branch 'master' of github.com:node-red/node-red

This commit is contained in:
Nick O'Leary 2017-06-28 14:20:03 +01:00
commit 23539ee907
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 4 additions and 6 deletions

View File

@ -59,12 +59,10 @@ module.exports = function(RED) {
while (node.data.length > 0) {
if (this.overwriteFile === "true") {
if (!node.wstream) {
node.wstream = fs.createWriteStream(filename, { encoding:'binary', flags:'w' });
node.wstream.on("error", function(err) {
node.error(RED._("file.errors.writefail",{error:err.toString()}),msg);
});
}
node.wstream = fs.createWriteStream(filename, { encoding:'binary', flags:'w' });
node.wstream.on("error", function(err) {
node.error(RED._("file.errors.writefail",{error:err.toString()}),msg);
});
}
else {
if (!node.wstream) {