Make sure file mounts higher up wins

Fixes #9693
This commit is contained in:
Bjørn Erik Pedersen
2022-03-20 11:24:44 +01:00
parent cad2d8cc70
commit 1c0e7c1ae1
6 changed files with 142 additions and 40 deletions

View File

@@ -224,13 +224,8 @@ func (w *Walkway) walk(path string, info FileMetaInfo, dirEntries []FileMetaInfo
// to the closest one.
fiw, fjw := fim.Weight, fjm.Weight
if fiw != fjw {
return fiw > fjw
}
// Explicit order set.
fio, fjo := fim.Ordinal, fjm.Ordinal
if fio != fjo {
return fio < fjo
return fiw > fjw
}
// When we walk into a symlink, we keep the reference to