Prevent writing output file over input file - closes #28

This commit is contained in:
Lovell Fuller
2014-05-22 22:27:02 +01:00
parent 6c96bd0d37
commit e32faac17a
2 changed files with 13 additions and 2 deletions

View File

@@ -145,5 +145,12 @@ async.series([
done();
});
});
},
// Attempt to output to input, should fail
function(done) {
sharp(inputJpg).write(inputJpg, function(err) {
assert(!!err);
done();
});
}
]);