mirror of
https://github.com/restic/restic.git
synced 2025-12-12 06:41:54 +00:00
Fix name including package name and variable shadowing package.
This commit is contained in:
@@ -93,8 +93,8 @@ const (
|
||||
indexMaxAge = 10 * time.Minute
|
||||
)
|
||||
|
||||
// IndexFull returns true iff the index is "full enough" to be saved as a preliminary index.
|
||||
var IndexFull = func(idx *Index) bool {
|
||||
// Full returns true iff the index is "full enough" to be saved as a preliminary index.
|
||||
var Full = func(idx *Index) bool {
|
||||
idx.m.RLock()
|
||||
defer idx.m.RUnlock()
|
||||
|
||||
@@ -119,7 +119,7 @@ var IndexFull = func(idx *Index) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
var IndexOversized = func(idx *Index) bool {
|
||||
var Oversized = func(idx *Index) bool {
|
||||
idx.m.RLock()
|
||||
defer idx.m.RUnlock()
|
||||
|
||||
@@ -258,8 +258,8 @@ func (idx *Index) EachByPack(ctx context.Context, packBlacklist restic.IDSet) <-
|
||||
for packID, packByType := range byPack {
|
||||
var result EachByPackResult
|
||||
result.PackID = packID
|
||||
for typ, pack := range packByType {
|
||||
for _, e := range pack {
|
||||
for typ, p := range packByType {
|
||||
for _, e := range p {
|
||||
result.Blobs = append(result.Blobs, idx.toPackedBlob(e, restic.BlobType(typ)).Blob)
|
||||
}
|
||||
}
|
||||
@@ -511,10 +511,10 @@ func DecodeIndex(buf []byte, id restic.ID) (idx *Index, err error) {
|
||||
}
|
||||
|
||||
idx = NewIndex()
|
||||
for _, pack := range idxJSON.Packs {
|
||||
packID := idx.addToPacks(pack.ID)
|
||||
for _, p := range idxJSON.Packs {
|
||||
packID := idx.addToPacks(p.ID)
|
||||
|
||||
for _, blob := range pack.Blobs {
|
||||
for _, blob := range p.Blobs {
|
||||
idx.store(packID, restic.Blob{
|
||||
BlobHandle: restic.BlobHandle{
|
||||
Type: blob.Type,
|
||||
|
||||
Reference in New Issue
Block a user