mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-01 14:33:31 +08:00
fix: handle dotted reserved snapshot names
This commit is contained in:
committed by
Affaan Mustafa
parent
61992f7f5e
commit
841beea45c
@@ -626,7 +626,12 @@ function sanitizeSnapshotName(value, fallback = 'session') {
|
||||
return sanitized;
|
||||
}
|
||||
if (sanitized && isWindowsReservedBasename(sanitized)) {
|
||||
return `${sanitized}-${hashString(raw).slice(0, 8)}`;
|
||||
const firstDotIndex = sanitized.indexOf('.');
|
||||
const hashSuffix = hashString(raw).slice(0, 8);
|
||||
if (firstDotIndex === -1) {
|
||||
return `${sanitized}-${hashSuffix}`;
|
||||
}
|
||||
return `${sanitized.slice(0, firstDotIndex)}-${hashSuffix}${sanitized.slice(firstDotIndex)}`;
|
||||
}
|
||||
|
||||
const prefix = sanitized ? sanitized.slice(0, 48).replace(/[._-]+$/g, '') : fallback;
|
||||
|
||||
Reference in New Issue
Block a user