mirror of
https://github.com/kopia/kopia.git
synced 2026-07-29 06:46:58 -04:00
Add WalkCrossDevice option to walk policy
Add the walk policy flag WalkCrossDevice to the fswalker Walk calls. This will avoid potential issues when running in a docker container where a FS tree is made of many overlays. Without the flag set, the Walk operation skips over files on devices that do not match the device at the base path.
This commit is contained in:
@@ -65,5 +65,6 @@ func WalkPathHash(ctx context.Context, path string) (*fspb.Walk, error) {
|
||||
Include: []string{path},
|
||||
HashPfx: []string{""}, // Hash everything
|
||||
MaxHashFileSize: MaxFileSizeToHash,
|
||||
WalkCrossDevice: true,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ func TestWalk(t *testing.T) {
|
||||
Include: []string{
|
||||
dataDir,
|
||||
},
|
||||
WalkCrossDevice: true,
|
||||
})
|
||||
testenv.AssertNoError(t, err)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user