Skip to content

Commit

Permalink
ref: 优化window读取系统应用
Browse files Browse the repository at this point in the history
  • Loading branch information
muwoo committed Sep 9, 2021
1 parent d047119 commit 9242f17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rubick2",
"version": "0.0.4",
"version": "0.0.5",
"author": "muwoo <2424880409@qq.com>",
"description": "An electron-vue project",
"license": null,
Expand Down
8 changes: 7 additions & 1 deletion src/renderer/assets/common/win-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ const getico = app =>{
try {
const buffer = fileIcon(app.desc, 32);
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) {
console.log(e, app.desc);
}
Expand Down

0 comments on commit 9242f17

Please sign in to comment.