fix ci test

This commit is contained in:
LaZzyMan 2026-02-09 15:30:06 +08:00
parent 37c3a38bb1
commit d3dfc26dea
7 changed files with 186 additions and 42 deletions

View file

@ -202,6 +202,17 @@ export function getProjectHash(projectRoot: string): string {
return crypto.createHash('sha256').update(normalizedPath).digest('hex');
}
/**
* Generates a hash using the legacy algorithm (without case normalization).
* This is used for backward compatibility to locate session directories
* created before the case-insensitive fix on Windows.
* @param projectRoot The absolute path to the project's root directory.
* @returns A SHA256 hash of the project root path without normalization.
*/
export function getLegacyProjectHash(projectRoot: string): string {
return crypto.createHash('sha256').update(projectRoot).digest('hex');
}
/**
* Checks if a path is a subpath of another path.
* @param parentPath The parent path.