rotating-file-stream
Advanced tools
Comparing version 1.1.8 to 1.1.9
@@ -149,31 +149,27 @@ "use strict"; | ||
var close = fs.close.bind(fs, fd); | ||
var unlink = fs.unlink.bind(fs, name, function(err) { if(err) self.emit("warning", err); }); | ||
var unlink = function(err) { | ||
fs.unlink(name, function(err2) { | ||
if(err2) | ||
self.emit("warning", err2); | ||
callback(err); | ||
}); | ||
}; | ||
fs.write(fd, cont, function(err) { | ||
if(err) { | ||
close(function(err) { | ||
if(err) | ||
self.emit("warning", err); | ||
unlink(); | ||
}); | ||
return callback(err); | ||
} | ||
close(function(err) { | ||
fs.close(fd, function(err2) { | ||
if(err) { | ||
unlink(); | ||
if(err2) | ||
self.emit("warning", err2); | ||
return callback(err); | ||
return unlink(err); | ||
} | ||
if(err2) | ||
return unlink(err2); | ||
if(name.indexOf(path.sep) === -1) | ||
name = "." + path.sep + name; | ||
cp.exec(name, function(err) { | ||
unlink(); | ||
callback(err); | ||
}); | ||
cp.exec(name, unlink); | ||
}); | ||
@@ -180,0 +176,0 @@ }); |
{ | ||
"name": "rotating-file-stream", | ||
"version": "1.1.8", | ||
"version": "1.1.9", | ||
"description": "Opens a stream.Writable to a file rotated by interval and/or size. A logrotate alternative.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -307,2 +307,4 @@ # rotating-file-stream | ||
* 2017-02-14 - v1.1.9 | ||
* fixed warning events order in case of external compression errors | ||
* 2017-02-13 - v1.1.8 | ||
@@ -309,0 +311,0 @@ * removed tmp dependecy due it was causing a strange instability now disappeared |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
360
1
31305
631