vendor: update github.com/a8m/tree - fixes #1797

This commit is contained in:
Nick Craig-Wood 2017-11-06 11:23:27 +00:00
parent dfaee55ef3
commit 8c8abfd6dc
3 changed files with 13 additions and 3 deletions

View file

@ -8,6 +8,11 @@ import (
)
func CTimeSort(f1, f2 os.FileInfo) bool {
s1, s2 := f1.Sys().(*syscall.Stat_t), f2.Sys().(*syscall.Stat_t)
s1, ok1 := f1.Sys().(*syscall.Stat_t)
s2, ok2 := f2.Sys().(*syscall.Stat_t)
// If this type of node isn't an os node then revert to ModSort
if !ok1 || !ok2 {
return ModSort(f1, f2)
}
return s1.Ctimespec.Sec < s2.Ctimespec.Sec
}

View file

@ -8,6 +8,11 @@ import (
)
func CTimeSort(f1, f2 os.FileInfo) bool {
s1, s2 := f1.Sys().(*syscall.Stat_t), f2.Sys().(*syscall.Stat_t)
s1, ok1 := f1.Sys().(*syscall.Stat_t)
s2, ok2 := f2.Sys().(*syscall.Stat_t)
// If this type of node isn't an os node then revert to ModSort
if !ok1 || !ok2 {
return ModSort(f1, f2)
}
return s1.Ctim.Sec < s2.Ctim.Sec
}