forked from TrueCloudLab/restic
restorer: extract hardlinks index from restic package
This commit is contained in:
parent
8c11fc3ec9
commit
c44b21d366
3 changed files with 5 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
package restic
|
||||
package restorer
|
||||
|
||||
import (
|
||||
"sync"
|
|
@ -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")
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue