用户桌面路径有空格的导致创建不了的问题
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "JUSTAR",
|
"name": "JUSTAR",
|
||||||
"version": "2.2.2",
|
"version": "2.2.3",
|
||||||
"description": "钜星科技便民问诊系统",
|
"description": "钜星科技便民问诊系统",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -159,7 +159,7 @@ let main ={
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label:'版本号:2.2.2',
|
label:'版本号:2.2.3',
|
||||||
icon: respath + path.sep+ "static"+ path.sep+"images"+ path.sep+"paste.png",
|
icon: respath + path.sep+ "static"+ path.sep+"images"+ path.sep+"paste.png",
|
||||||
},]
|
},]
|
||||||
});
|
});
|
||||||
|
|||||||
@ -108,8 +108,9 @@
|
|||||||
if (error != null) {
|
if (error != null) {
|
||||||
console.log('获取注册表桌面路径失败,异常如下:' + error);
|
console.log('获取注册表桌面路径失败,异常如下:' + error);
|
||||||
} else {
|
} else {
|
||||||
let value = iconv.decode(new Buffer(stdout, binaryEncoding), encoding).split(" ");
|
let value = iconv.decode(new Buffer(stdout, binaryEncoding), encoding);
|
||||||
desktop = value[value.length - 1].replace(/^\s*|\s*$/g, ""); //获取注册表实际值并去除首尾空格
|
value = value.substring(value.indexOf(":") - 1);
|
||||||
|
desktop = value.replace(/^\s*|\s*$/g, ""); //获取注册表实际值并去除首尾空格
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!desktop) {
|
if (!desktop) {
|
||||||
|
|||||||
Reference in New Issue
Block a user