mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-11-29 10:43:47 +00:00
Some checks are pending
CI / semgrep (push) Waiting to run
Tests / test (22) (push) Waiting to run
Tests / test (24) (push) Waiting to run
Tests / test (26) (push) Waiting to run
Tests / test-platforms (macos-latest) (push) Waiting to run
Tests / test (22.13.0) (push) Waiting to run
Tests / test-platforms (windows-latest) (push) Waiting to run
Tests / desktop (push) Waiting to run
* Add regressions for redirected editor storage roots * Honor redirected data roots for Copilot and Cursor * Verify redirected Copilot OTel discovery on Linux * Reproduce Cursor cache collisions across storage roots * Bind Cursor result caches to their database and backfill redirected history * Verify redirected discovery against the latest daily cache * Update env guard and document editor storage overrides
10 lines
515 B
TypeScript
10 lines
515 B
TypeScript
import { posix, win32 } from 'node:path'
|
|
|
|
/** Default Electron editor data directory, honoring the OS's redirected root. */
|
|
export function getEditorDataDir(editor: string, home: string, os: string): string {
|
|
if (os === 'darwin') return posix.join(home, 'Library', 'Application Support', editor)
|
|
if (os === 'win32') {
|
|
return win32.join(process.env['APPDATA'] || win32.join(home, 'AppData', 'Roaming'), editor)
|
|
}
|
|
return posix.join(process.env['XDG_CONFIG_HOME'] || posix.join(home, '.config'), editor)
|
|
}
|