| 16 | } |
| 17 | |
| 18 | function makePathProvider(root: string): PathProvider { |
| 19 | return { |
| 20 | getSystemDir: () => path.join(root, 'system'), |
| 21 | getUserDataDir: () => path.join(root, 'data'), |
| 22 | getDatabaseDir: () => path.join(root, 'data', 'databases'), |
| 23 | getVectorDir: () => path.join(root, 'data', 'vector'), |
| 24 | getAiDataDir: () => path.join(root, 'system', 'ai'), |
| 25 | getSettingsDir: () => path.join(root, 'system', 'settings'), |
| 26 | getCacheDir: () => path.join(root, 'system', 'cache'), |
| 27 | getTempDir: () => path.join(root, 'system', 'temp'), |
| 28 | getLogsDir: () => path.join(root, 'system', 'logs'), |
| 29 | getDownloadsDir: () => path.join(root, 'downloads'), |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | test('migrateDatabase writes data directory compatibility meta after segment schema migration', () => { |
| 34 | const root = makeTempDir() |