2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-22 02:48:55 +00:00

restorer: extract hardlinks index from restic package

This commit is contained in:
Michael Eischer 2022-07-17 13:45:42 +02:00
parent 8c11fc3ec9
commit c44b21d366
3 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
package restic
package restorer
import (
"sync"

View File

@ -1,16 +1,16 @@
package restic_test
package restorer_test
import (
"testing"
"github.com/restic/restic/internal/restic"
"github.com/restic/restic/internal/restorer"
rtest "github.com/restic/restic/internal/test"
)
// TestHardLinks contains various tests for HardlinkIndex.
func TestHardLinks(t *testing.T) {
idx := restic.NewHardlinkIndex()
idx := restorer.NewHardlinkIndex()
idx.Add(1, 2, "inode1-file1-on-device2")
idx.Add(2, 3, "inode2-file2-on-device3")

View File

@ -218,7 +218,7 @@ func (res *Restorer) RestoreTo(ctx context.Context, dst string) error {
}
}
idx := restic.NewHardlinkIndex()
idx := NewHardlinkIndex()
filerestorer := newFileRestorer(dst, res.repo.Backend().Load, res.repo.Key(), res.repo.Index().Lookup, res.repo.Connections())
filerestorer.Error = res.Error