mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 21:58:03 +00:00
fix: bugs (#1464)
* fix: nextFMTrack 执行顺序 * fix: 当前歌曲无法播放时,播放下一首 * fix: windows下无法创建部分文件 * fix: windows下无法加载sqlite3
This commit is contained in:
parent
530581ba82
commit
24798a0bf3
4 changed files with 13 additions and 5 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
export const createDirIfNotExist = (dir: string) => {
|
||||
if (!fs.existsSync(dir)) {
|
||||
|
|
@ -7,7 +8,7 @@ export const createDirIfNotExist = (dir: string) => {
|
|||
}
|
||||
|
||||
export const createFileIfNotExist = (file: string) => {
|
||||
createDirIfNotExist(file.split('/').slice(0, -1).join('/'))
|
||||
createDirIfNotExist(path.dirname(file))
|
||||
if (!fs.existsSync(file)) {
|
||||
fs.writeFileSync(file, '')
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue