mirror of https://github.com/certd/certd
fix: 修复复制到本机插件,pfx格式复制时报错的bug
parent
85c99f7f80
commit
f57116d2be
|
@ -69,6 +69,9 @@ export class CertReader {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
const ic = this.crt.substring(start);
|
const ic = this.crt.substring(start);
|
||||||
|
if (ic == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
return ic.trim();
|
return ic.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -226,7 +226,7 @@ export class CopyCertToLocalPlugin extends AbstractTaskPlugin {
|
||||||
this.hostIcPath = icPath;
|
this.hostIcPath = icPath;
|
||||||
}
|
}
|
||||||
if (pfxPath) {
|
if (pfxPath) {
|
||||||
pfxPath = icPath.trim();
|
pfxPath = pfxPath.trim();
|
||||||
pfxPath = pfxPath.startsWith('/') ? pfxPath : path.join(Constants.dataDir, pfxPath);
|
pfxPath = pfxPath.startsWith('/') ? pfxPath : path.join(Constants.dataDir, pfxPath);
|
||||||
this.copyFile(tmpPfxPath, pfxPath);
|
this.copyFile(tmpPfxPath, pfxPath);
|
||||||
this.hostPfxPath = pfxPath;
|
this.hostPfxPath = pfxPath;
|
||||||
|
|
Loading…
Reference in New Issue