mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-19 11:38:38 +00:00
fix: correct Windows path handling in preload.js and update .gitignore for consistency
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -15,5 +15,4 @@ tiktoken_cache
|
|||||||
.eslintcache
|
.eslintcache
|
||||||
|
|
||||||
electron/node_modules
|
electron/node_modules
|
||||||
electron/dist
|
electron/dist
|
||||||
electron/package-lock.json
|
|
||||||
3677
electron/package-lock.json
generated
Normal file
3677
electron/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -9,9 +9,10 @@ function getDataDirPath() {
|
|||||||
switch (platform) {
|
switch (platform) {
|
||||||
case 'darwin':
|
case 'darwin':
|
||||||
return `${homeDir}/Library/Application Support/New API/data`;
|
return `${homeDir}/Library/Application Support/New API/data`;
|
||||||
case 'win32':
|
case 'win32': {
|
||||||
const appData = process.env.APPDATA || `${homeDir}\\AppData\\Roaming`;
|
const appData = process.env.APPDATA || `${homeDir}\\AppData\\Roaming`;
|
||||||
return `${appData}\\New API\\data`;
|
return `${appData}\\New API\\data`;
|
||||||
|
}
|
||||||
case 'linux':
|
case 'linux':
|
||||||
return `${homeDir}/.config/New API/data`;
|
return `${homeDir}/.config/New API/data`;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user