From dfb8446cfd037bb2af14ed5faf5421bb38237027 Mon Sep 17 00:00:00 2001 From: muwoo <2424880409@qq.com> Date: Fri, 3 Nov 2023 13:59:29 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20windows=20=E5=90=AF=E5=8A=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/app-search/win.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/app-search/win.ts b/src/core/app-search/win.ts index 7e73c03..7a8442c 100644 --- a/src/core/app-search/win.ts +++ b/src/core/app-search/win.ts @@ -1,12 +1,8 @@ import fs from 'fs'; import path from 'path'; import os from 'os'; -import translate from './translate'; import { shell } from 'electron'; -// eslint-disable-next-line @typescript-eslint/no-var-requires -const fileIcon = require('extract-file-icon'); - const filePath = path.resolve( 'C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs' ); @@ -29,6 +25,8 @@ if (!exists) { const getico = (app) => { try { + // eslint-disable-next-line @typescript-eslint/no-var-requires + const fileIcon = require('extract-file-icon'); const buffer = fileIcon(app.desc, 32); const iconpath = path.join(icondir, `${app.name}.png`);