Skip to content

Commit

Permalink
rawx(Go): fix computation hash path
Browse files Browse the repository at this point in the history
  • Loading branch information
Pofilo committed Sep 27, 2021
1 parent b11a262 commit 29726a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rawx/filerepo.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// OpenIO SDS Go rawx
// Copyright (C) 2015-2020 OpenIO SAS
// Copyright (C) 2021 OVH SAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Affero General Public
Expand Down Expand Up @@ -428,7 +429,7 @@ func (fr *realFileReader) getAttr(key string, value []byte) (int, error) {
func (fr *fileRepository) nameToRelPath(name string) string {
sb := strings.Builder{}
for i := 0; i < fr.hashDepth; i++ {
start := i * fr.hashDepth
start := i * fr.hashWidth
sb.WriteString(name[start : start+fr.hashWidth])
sb.WriteRune('/')
}
Expand Down

0 comments on commit 29726a7

Please sign in to comment.