diff --git a/processor-ffmpeg.js b/processor-ffmpeg.js index 6740df1..203b9cf 100644 --- a/processor-ffmpeg.js +++ b/processor-ffmpeg.js @@ -30,7 +30,9 @@ FFMPEGProcessor.prototype.run = function() { fs.rename(tempFilename, filename, function(err) { - logger.error('Could not move ' + tempFilename + ' to ' + filename + ': ' + err.message); + if (err) + logger.error('Could not move ' + tempFilename + ' to ' + filename + ': ' + err); + self.doEnd(); }); } diff --git a/processor-http-ffmpeg.js b/processor-http-ffmpeg.js index 92fedfa..f940e0c 100644 --- a/processor-http-ffmpeg.js +++ b/processor-http-ffmpeg.js @@ -69,7 +69,8 @@ HTTPFFMPEGProcessor.prototype.cleanup = function() fs.rename(this.tempFilename, this.filename, function(err) { - logger.error('Could not move ' + this.tempFilename + ' to ' + this.filename + ': ' + err.message); + if (err) + logger.error('Could not move ' + this.tempFilename + ' to ' + this.filename + ': ' + err); }); } diff --git a/processor-http-raw.js b/processor-http-raw.js index 1625946..6890dbb 100644 --- a/processor-http-raw.js +++ b/processor-http-raw.js @@ -48,7 +48,8 @@ HTTPRawProcessor.prototype.cleanup = function() fs.rename(this.tempFilename, this.filename, function(err) { - logger.error('Could not move ' + this.tempFilename + ' to ' + this.filename + ': ' + err.message); + if (err) + logger.error('Could not move ' + this.tempFilename + ' to ' + this.filename + ': ' + err); }); }