Revert "rollback unlink -> unlinkSync"

This reverts commit 074ac15d0f.
This commit is contained in:
手瓜一十雪 2024-09-04 18:04:58 +08:00
parent 074ac15d0f
commit 043d8a1861

View File

@ -38,7 +38,7 @@ export async function encodeSilk(filePath: string, TEMP_DIR: string, logger: Log
if (code == null || EXIT_CODES.includes(code)) {
sampleRate = 24000;
const data = fs.readFileSync(pcmPath);
fs.unlink(pcmPath, () => {});
fs.unlinkSync(pcmPath);
return resolve(data);
}
logger.logError(`ffmpeg 处理失败: code=${code ?? 'unknown'} sig=${signal ?? 'unknown'}`);