Feature(custom): add more log file quick open item

This commit is contained in:
Kuingsmile
2023-12-27 01:45:16 -08:00
parent f1084e5927
commit 1884dbac06
6 changed files with 37 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ import {
ipcMain,
clipboard
} from 'electron'
import fs from 'fs-extra'
// Electron modules
@@ -371,6 +372,9 @@ const handlePicGoGalleryDB = () => {
const handleOpenFile = () => {
ipcMain.on(PICGO_OPEN_FILE, (event: IpcMainEvent, fileName: string) => {
const abFilePath = path.join(STORE_PATH, fileName)
if (!fs.existsSync(abFilePath)) {
fs.writeFileSync(abFilePath, '')
}
shell.openPath(abFilePath)
})
}