Commit 65c430f6 by CaIon

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

parent 32f806d5
......@@ -15,5 +15,4 @@ tiktoken_cache
.eslintcache
electron/node_modules
electron/dist
electron/package-lock.json
\ No newline at end of file
electron/dist
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment