mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #9774 from timvandermeij/unlink
Use `fs.unlinkSync` instead of `fs.unlink` when removing files in the font tests
This commit is contained in:
commit
5053d02ba4
1 changed files with 2 additions and 2 deletions
|
@ -69,7 +69,7 @@ exports.translateFont = function translateFont(content, registerOnCancel,
|
|||
|
||||
fs.writeFileSync(fontPath, buffer);
|
||||
runTtx(ttxResourcesHome, fontPath, registerOnCancel, function (err) {
|
||||
fs.unlink(fontPath);
|
||||
fs.unlinkSync(fontPath);
|
||||
if (err) {
|
||||
console.error(err);
|
||||
callback(err);
|
||||
|
@ -77,7 +77,7 @@ exports.translateFont = function translateFont(content, registerOnCancel,
|
|||
callback('Output was not generated');
|
||||
} else {
|
||||
callback(null, fs.readFileSync(resultPath));
|
||||
fs.unlink(resultPath);
|
||||
fs.unlinkSync(resultPath);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue