X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e7d36bd8f4ca443f433c63eac863fec7e61ef121..47c7337cc9c33a19208946deceecc5ce266ae741:/services/keepstore/volume_unix.go diff --git a/services/keepstore/volume_unix.go b/services/keepstore/volume_unix.go index e745eb2691..910cc25d61 100644 --- a/services/keepstore/volume_unix.go +++ b/services/keepstore/volume_unix.go @@ -292,6 +292,7 @@ func (v *UnixVolume) Status() *VolumeStatus { } var blockDirRe = regexp.MustCompile(`^[0-9a-f]+$`) +var blockFileRe = regexp.MustCompile(`^[0-9a-f]{32}$`) // IndexTo writes (to the given Writer) a list of blocks found on this // volume which begin with the specified prefix. If the prefix is an @@ -348,6 +349,9 @@ func (v *UnixVolume) IndexTo(prefix string, w io.Writer) error { if !strings.HasPrefix(name, prefix) { continue } + if !blockFileRe.MatchString(name) { + continue + } _, err = fmt.Fprint(w, name, "+", fileInfo[0].Size(),