Feature: finish custom config path

ISSUES CLOSED: #255
This commit is contained in:
PiEgg
2021-08-01 17:02:54 +08:00
parent 96a63ea11a
commit 7030f7a764
13 changed files with 119 additions and 62 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ import {
} from 'electron'
import path from 'path'
import db, { GalleryDB } from 'apis/core/datastore'
import { dbPathChecker, defaultConfigPath } from 'apis/core/datastore/dbChecker'
import { dbPathChecker, defaultConfigPath, getGalleryDBPath } from 'apis/core/datastore/dbChecker'
import uploader from 'apis/app/uploader'
import pasteTemplate from '#/utils/pasteTemplate'
import { handleCopyUrl } from '~/main/utils/common'
@@ -138,7 +138,7 @@ class GuiApi implements IGuiApi {
*/
async getConfigPath () {
const currentConfigPath = dbPathChecker()
const galleryDBPath = path.join(path.dirname(currentConfigPath), 'picgo.db')
const galleryDBPath = getGalleryDBPath().dbPath
return {
defaultConfigPath,
currentConfigPath,