mirror of
https://github.com/rclone/rclone.git
synced 2025-01-31 15:54:22 +08:00
vendor: update github.com/a8m/tree - fixes #1797
This commit is contained in:
parent
dfaee55ef3
commit
8c8abfd6dc
2
Gopkg.lock
generated
2
Gopkg.lock
generated
|
@ -41,7 +41,7 @@
|
||||||
branch = "master"
|
branch = "master"
|
||||||
name = "github.com/a8m/tree"
|
name = "github.com/a8m/tree"
|
||||||
packages = ["."]
|
packages = ["."]
|
||||||
revision = "4b871cd428eeab064e45ff2bf65054bb7eb10d6c"
|
revision = "5554ed4554293f11a726accc1ebf2bd3342742f8"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
branch = "master"
|
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 {
|
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
|
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 {
|
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
|
return s1.Ctim.Sec < s2.Ctim.Sec
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user