mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-18 09:46:59 +08:00
ref: 优化window读取系统应用
This commit is contained in:
parent
d047119076
commit
9242f17cde
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "rubick2",
|
"name": "rubick2",
|
||||||
"version": "0.0.4",
|
"version": "0.0.5",
|
||||||
"author": "muwoo <2424880409@qq.com>",
|
"author": "muwoo <2424880409@qq.com>",
|
||||||
"description": "An electron-vue project",
|
"description": "An electron-vue project",
|
||||||
"license": null,
|
"license": null,
|
||||||
|
@ -17,7 +17,13 @@ const getico = app =>{
|
|||||||
try {
|
try {
|
||||||
const buffer = fileIcon(app.desc, 32);
|
const buffer = fileIcon(app.desc, 32);
|
||||||
const iconpath = path.join(icondir, `${app.name}.png`);
|
const iconpath = path.join(icondir, `${app.name}.png`);
|
||||||
fs.writeFileSync(iconpath, buffer, 'base64');
|
|
||||||
|
fs.exists(iconpath, exists => {
|
||||||
|
if (!exists) {
|
||||||
|
fs.writeFile(iconpath, buffer, 'base64', () => {});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.log(e, app.desc);
|
console.log(e, app.desc);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user