diff --git a/Gopkg.lock b/Gopkg.lock index 350685269..5edb998bb 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -41,7 +41,7 @@ branch = "master" name = "github.com/a8m/tree" packages = ["."] - revision = "4b871cd428eeab064e45ff2bf65054bb7eb10d6c" + revision = "5554ed4554293f11a726accc1ebf2bd3342742f8" [[projects]] branch = "master" diff --git a/vendor/github.com/a8m/tree/csort_bsd.go b/vendor/github.com/a8m/tree/csort_bsd.go index d2bbbcc3b..f5895a62b 100644 --- a/vendor/github.com/a8m/tree/csort_bsd.go +++ b/vendor/github.com/a8m/tree/csort_bsd.go @@ -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 } diff --git a/vendor/github.com/a8m/tree/csort_unix.go b/vendor/github.com/a8m/tree/csort_unix.go index 3d769f393..6acd09224 100644 --- a/vendor/github.com/a8m/tree/csort_unix.go +++ b/vendor/github.com/a8m/tree/csort_unix.go @@ -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 }