forked from TrueCloudLab/rclone
vendor: update all dependencies
* Update all dependencies * Remove all `[[constraint]]` from Gopkg.toml * Add in the minimum number of `[[override]]` to build * Remove go get of github.com/inconshreveable/mousetrap as it is vendored * Update docs with new policy on constraints
This commit is contained in:
parent
21383877df
commit
6427029c4e
4902 changed files with 1443417 additions and 227283 deletions
19
vendor/github.com/pkg/sftp/server_unix.go
generated
vendored
19
vendor/github.com/pkg/sftp/server_unix.go
generated
vendored
|
@ -6,7 +6,9 @@ package sftp
|
|||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/user"
|
||||
"path"
|
||||
"strconv"
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
|
@ -20,10 +22,21 @@ func runLsStatt(dirent os.FileInfo, statt *syscall.Stat_t) string {
|
|||
typeword := runLsTypeWord(dirent)
|
||||
numLinks := statt.Nlink
|
||||
uid := statt.Uid
|
||||
usr, err := user.LookupId(strconv.Itoa(int(uid)))
|
||||
var username string
|
||||
if err == nil {
|
||||
username = usr.Username
|
||||
} else {
|
||||
username = fmt.Sprintf("%d", uid)
|
||||
}
|
||||
gid := statt.Gid
|
||||
username := fmt.Sprintf("%d", uid)
|
||||
groupname := fmt.Sprintf("%d", gid)
|
||||
// TODO FIXME: uid -> username, gid -> groupname lookup for ls -l format output
|
||||
grp, err := user.LookupGroupId(strconv.Itoa(int(gid)))
|
||||
var groupname string
|
||||
if err == nil {
|
||||
groupname = grp.Name
|
||||
} else {
|
||||
groupname = fmt.Sprintf("%d", gid)
|
||||
}
|
||||
|
||||
mtime := dirent.ModTime()
|
||||
monthStr := mtime.Month().String()[0:3]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue