mirror of
https://github.com/lovell/sharp.git
synced 2026-02-04 05:36:18 +01:00
Prevent writing output file over input file - closes #28
This commit is contained in:
@@ -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();
|
||||
});
|
||||
}
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user