WIP: Blobtree substorage #645
2 changed files with 4 additions and 2 deletions
|
@ -21,6 +21,8 @@ const (
|
|||
sizeOfDataLength = 8
|
||||
sizeOfContainerID = sha256.Size
|
||||
sizeOfObjectID = sha256.Size
|
||||
|
||||
dataExtension = ".data"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -187,5 +189,5 @@ func (b *BlobTree) estimateSize(records []objectData) uint64 {
|
|||
}
|
||||
|
||||
func (b *BlobTree) getFilePath(dir string, idx uint64) string {
|
||||
return filepath.Join(dir, strconv.FormatUint(idx, 16))
|
||||
return filepath.Join(dir, strconv.FormatUint(idx, 16)+dataExtension)
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ func (b *BlobTree) isTempFile(name string) bool {
|
|||
}
|
||||
|
||||
func (b *BlobTree) parseIdx(name string) (uint64, error) {
|
||||
return strconv.ParseUint(name, 16, 64)
|
||||
return strconv.ParseUint(strings.TrimSuffix(name, dataExtension), 16, 64)
|
||||
}
|
||||
|
||||
func (b *BlobTree) Close() error {
|
||||
|
|
Loading…
Reference in a new issue