fix: correct Windows path handling in preload.js and update .gitignore for consistency

This commit is contained in:
CaIon
2025-10-05 17:15:10 +08:00
parent 32f806d562
commit 65c430f6f0
3 changed files with 3680 additions and 3 deletions

3
.gitignore vendored
View File

@@ -15,5 +15,4 @@ tiktoken_cache
.eslintcache
electron/node_modules
electron/dist
electron/package-lock.json
electron/dist

3677
electron/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -9,9 +9,10 @@ function getDataDirPath() {
switch (platform) {
case 'darwin':
return `${homeDir}/Library/Application Support/New API/data`;
case 'win32':
case 'win32': {
const appData = process.env.APPDATA || `${homeDir}\\AppData\\Roaming`;
return `${appData}\\New API\\data`;
}
case 'linux':
return `${homeDir}/.config/New API/data`;
default: