Compare commits

...

3 Commits

Author SHA1 Message Date
Manu NALEPA
d855816878 Write changelog 2025-10-20 15:10:47 +02:00
Manu NALEPA
ab1e0bddc9 WarmCache: Return if extractFileMetadata fails. 2025-10-20 15:10:47 +02:00
Manu NALEPA
3e997cf115 extractFileMetadata: Use filepath.Separator instead of "/" for Windows. 2025-10-20 15:10:47 +02:00
2 changed files with 5 additions and 2 deletions

View File

@@ -200,6 +200,7 @@ func (dcs *DataColumnStorage) WarmCache() {
fileMetadata, err := extractFileMetadata(path)
if err != nil {
log.WithError(err).Error("Error encountered while extracting file metadata")
return nil
}
// Open the data column filesystem file.
@@ -988,8 +989,7 @@ func filePath(root [fieldparams.RootLength]byte, epoch primitives.Epoch) string
// extractFileMetadata extracts the metadata from a file path.
// If the path is not a leaf, it returns nil.
func extractFileMetadata(path string) (*fileMetadata, error) {
// Is this Windows friendly?
parts := strings.Split(path, "/")
parts := strings.Split(path, string(filepath.Separator))
if len(parts) != 3 {
return nil, errors.Errorf("unexpected file %s", path)
}

View File

@@ -0,0 +1,3 @@
### Fixed
- `WarmCache`: Return if `extractFileMetadata` fails.
- `extractFileMetadata`: Use filepath.Separator instead of `/` for Windows support.