Skip to content

Commit

Permalink
Fix icons gettings copied twice
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed Jul 25, 2023
1 parent 5d78212 commit 5e82f69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/model/assistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ export default class Assistant {

// If the icon file is located outside app's bundle, copy it to user data dir.
#copyIcon(icon: Icon) {
if (icon.filePath.startsWith(Icon.builtinIconsPath))
if (icon.filePath.startsWith(Icon.builtinIconsPath) ||
icon.filePath.startsWith(Icon.userIconsPath))
return icon;
const filename = crypto.randomUUID() + path.extname(icon.filePath);
const filePath = path.join(Icon.userIconsPath, filename);
Expand Down

0 comments on commit 5e82f69

Please sign in to comment.