mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 13:48:02 +00:00
feat: 解决build bug
This commit is contained in:
parent
46fe2d734e
commit
e99c4833f7
47 changed files with 1236 additions and 611 deletions
|
|
@ -1,17 +1,13 @@
|
|||
import logger from './logger'
|
||||
import path from 'path'
|
||||
import { app } from 'electron'
|
||||
import fs from 'fs'
|
||||
import { createDirIfNotExist } from './utils'
|
||||
|
||||
const isDev = process.env.NODE_ENV === 'development'
|
||||
|
||||
if (isDev) {
|
||||
const devUserDataPath = path.resolve(process.cwd(), './tmp/userData')
|
||||
try {
|
||||
fs.statSync(devUserDataPath)
|
||||
} catch (e) {
|
||||
fs.mkdirSync(devUserDataPath)
|
||||
}
|
||||
createDirIfNotExist(devUserDataPath)
|
||||
app.setPath('appData', devUserDataPath)
|
||||
}
|
||||
logger.info(`[index] userData path: ${app.getPath('userData')}`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue