1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-20 02:03:17 +00:00

vendor: update all dependencies

This commit is contained in:
Nick Craig-Wood
2018-06-17 17:59:12 +01:00
parent 3f0789e2db
commit 08021c4636
2474 changed files with 435818 additions and 282709 deletions

View File

@@ -6,9 +6,7 @@ package sftp
import (
"fmt"
"os"
"os/user"
"path"
"strconv"
"syscall"
"time"
)
@@ -22,21 +20,10 @@ 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
grp, err := user.LookupGroupId(strconv.Itoa(int(gid)))
var groupname string
if err == nil {
groupname = grp.Name
} else {
groupname = fmt.Sprintf("%d", gid)
}
username := fmt.Sprintf("%d", uid)
groupname := fmt.Sprintf("%d", gid)
// TODO FIXME: uid -> username, gid -> groupname lookup for ls -l format output
mtime := dirent.ModTime()
monthStr := mtime.Month().String()[0:3]