mirror of
https://github.com/certd/certd.git
synced 2026-04-14 20:40:53 +08:00
perf: 优化跳过处理逻辑
This commit is contained in:
@@ -79,10 +79,15 @@ export class CertReader {
|
||||
} finally {
|
||||
//删除临时文件
|
||||
logger.info("删除临时文件");
|
||||
fs.unlinkSync(tmpCrtPath);
|
||||
fs.unlinkSync(tmpKeyPath);
|
||||
fs.unlinkSync(tmpPfxPath);
|
||||
fs.unlinkSync(tmpDerPath);
|
||||
function removeFile(filepath?: string) {
|
||||
if (filepath) {
|
||||
fs.unlinkSync(filepath);
|
||||
}
|
||||
}
|
||||
removeFile(tmpCrtPath);
|
||||
removeFile(tmpKeyPath);
|
||||
removeFile(tmpPfxPath);
|
||||
removeFile(tmpDerPath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user