forked from TrueCloudLab/rclone
vendor: update github.com/a8m/tree - fixes #1797
This commit is contained in:
parent
dfaee55ef3
commit
8c8abfd6dc
3 changed files with 13 additions and 3 deletions
2
Gopkg.lock
generated
2
Gopkg.lock
generated
|
@ -41,7 +41,7 @@
|
|||
branch = "master"
|
||||
name = "github.com/a8m/tree"
|
||||
packages = ["."]
|
||||
revision = "4b871cd428eeab064e45ff2bf65054bb7eb10d6c"
|
||||
revision = "5554ed4554293f11a726accc1ebf2bd3342742f8"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
|
7
vendor/github.com/a8m/tree/csort_bsd.go
generated
vendored
7
vendor/github.com/a8m/tree/csort_bsd.go
generated
vendored
|
@ -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
|
||||
}
|
||||
|
|
7
vendor/github.com/a8m/tree/csort_unix.go
generated
vendored
7
vendor/github.com/a8m/tree/csort_unix.go
generated
vendored
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue