Update github.com/Microsoft/hcsshim to v0.8.15

Fixes #4915

Release info: https://github.com/microsoft/hcsshim/releases/tag/v0.8.15

Signed-off-by: Kevin Parsons <kevpar@microsoft.com>
This commit is contained in:
Kevin Parsons
2021-03-02 16:05:50 -08:00
parent 134f7a7370
commit 82dccdc490
31 changed files with 1003 additions and 102 deletions

View File

@@ -924,7 +924,13 @@ func (w *Writer) writeDirectory(dir, parent *inode) error {
children = append(children, name)
}
sort.Slice(children, func(i, j int) bool {
return dir.Children[children[i]].Number < dir.Children[children[j]].Number
left_num := dir.Children[children[i]].Number
right_num := dir.Children[children[j]].Number
if left_num == right_num {
return children[i] < children[j]
}
return left_num < right_num
})
for _, name := range children {
@@ -945,7 +951,24 @@ func (w *Writer) writeDirectoryRecursive(dir, parent *inode) error {
if err := w.writeDirectory(dir, parent); err != nil {
return err
}
for _, child := range dir.Children {
// Follow e2fsck's convention and sort the children by inode number.
var children []string
for name := range dir.Children {
children = append(children, name)
}
sort.Slice(children, func(i, j int) bool {
left_num := dir.Children[children[i]].Number
right_num := dir.Children[children[j]].Number
if left_num == right_num {
return children[i] < children[j]
}
return left_num < right_num
})
for _, name := range children {
child := dir.Children[name]
if child.IsDir() {
if err := w.writeDirectoryRecursive(child, dir); err != nil {
return err