mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix file node to overwrite multiple files
This commit is contained in:
parent
283d5c64cb
commit
b515df611d
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user