fix: 修复复制到本机插件,pfx格式复制时报错的bug

pull/330/head
xiaojunnuo 2025-01-07 23:13:44 +08:00
parent 85c99f7f80
commit f57116d2be
2 changed files with 4 additions and 1 deletions

View File

@ -69,6 +69,9 @@ export class CertReader {
return "";
}
const ic = this.crt.substring(start);
if (ic == null) {
return "";
}
return ic.trim();
}

View File

@ -226,7 +226,7 @@ export class CopyCertToLocalPlugin extends AbstractTaskPlugin {
this.hostIcPath = icPath;
}
if (pfxPath) {
pfxPath = icPath.trim();
pfxPath = pfxPath.trim();
pfxPath = pfxPath.startsWith('/') ? pfxPath : path.join(Constants.dataDir, pfxPath);
this.copyFile(tmpPfxPath, pfxPath);
this.hostPfxPath = pfxPath;