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

2
Gopkg.lock generated
View File

@ -41,7 +41,7 @@
branch = "master"
name = "github.com/a8m/tree"
packages = ["."]
revision = "4b871cd428eeab064e45ff2bf65054bb7eb10d6c"
revision = "5554ed4554293f11a726accc1ebf2bd3342742f8"
[[projects]]
branch = "master"

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
}