mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge branch 'master' of github.com:node-red/node-red
This commit is contained in:
commit
23539ee907
@ -59,13 +59,11 @@ module.exports = function(RED) {
|
|||||||
|
|
||||||
while (node.data.length > 0) {
|
while (node.data.length > 0) {
|
||||||
if (this.overwriteFile === "true") {
|
if (this.overwriteFile === "true") {
|
||||||
if (!node.wstream) {
|
|
||||||
node.wstream = fs.createWriteStream(filename, { encoding:'binary', flags:'w' });
|
node.wstream = fs.createWriteStream(filename, { encoding:'binary', flags:'w' });
|
||||||
node.wstream.on("error", function(err) {
|
node.wstream.on("error", function(err) {
|
||||||
node.error(RED._("file.errors.writefail",{error:err.toString()}),msg);
|
node.error(RED._("file.errors.writefail",{error:err.toString()}),msg);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
if (!node.wstream) {
|
if (!node.wstream) {
|
||||||
node.wstream = fs.createWriteStream(filename, { encoding:'binary', flags:'a' });
|
node.wstream = fs.createWriteStream(filename, { encoding:'binary', flags:'a' });
|
||||||
|
Loading…
Reference in New Issue
Block a user