MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / getLegacyDataDir

Function getLegacyDataDir

apps/desktop/main/paths.ts:327–339  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

325 * 用于数据迁移检测
326 */
327export function getLegacyDataDir(): string {
328 if (_legacyDataDir) return _legacyDataDir
329
330 try {
331 const docPath = app.getPath('documents')
332 _legacyDataDir = path.join(docPath, 'ChatLab')
333 } catch (error) {
334 console.error('[Paths] Error getting documents path:', error)
335 _legacyDataDir = path.join(process.cwd(), 'ChatLab')
336 }
337
338 return _legacyDataDir
339}
340
341/**
342 * 获取系统下载目录

Callers 3

needsLegacyMigrationFunction · 0.85
migrateFromLegacyDirFunction · 0.85
removeLegacyDirFunction · 0.85

Calls 1

errorMethod · 0.65

Tested by

no test coverage detected