fix loading generational ec volumes

This commit is contained in:
chrislu
2025-08-13 18:31:03 -07:00
parent 66c688c656
commit 722aebdf11

View File

@@ -115,6 +115,11 @@ func volumeIdFromFileName(filename string) (needle.VolumeId, string, error) {
}
func parseCollectionVolumeId(base string) (collection string, vid needle.VolumeId, err error) {
// Remove generation suffix first (e.g., "1_g1" -> "1")
if gIndex := strings.LastIndex(base, "_g"); gIndex >= 0 {
base = base[:gIndex]
}
i := strings.LastIndex(base, "_")
if i > 0 {
collection, base = base[0:i], base[i+1:]