Function
getBackupFileName
(filePath: string, version: number)
Source from the content-addressed store, hash-verified
| 723 | } |
| 724 | |
| 725 | function getBackupFileName(filePath: string, version: number): string { |
| 726 | const fileNameHash = createHash('sha256') |
| 727 | .update(filePath) |
| 728 | .digest('hex') |
| 729 | .slice(0, 16) |
| 730 | return `${fileNameHash}@v${version}` |
| 731 | } |
| 732 | |
| 733 | function resolveBackupPath(backupFileName: string, sessionId?: string): string { |
| 734 | const configDir = getClaudeConfigHomeDir() |
Tested by
no test coverage detected