config/packages/tools/brig/ls-no-check-cached.patch

38 lines
1.1 KiB
Diff
Raw Permalink Normal View History

2022-06-16 01:21:24 +03:00
diff --git a/cmd/fs_handlers.go b/cmd/fs_handlers.go
index f1791b16..d86e8d91 100644
--- a/cmd/fs_handlers.go
+++ b/cmd/fs_handlers.go
@@ -449,7 +449,7 @@ func handleList(ctx *cli.Context, ctl *client.Client) error {
userColumn = "USER\t"
}
- fmt.Fprintf(tabW, "SIZE\tBKEND\tMODTIME\t%sPATH\tPIN\tCACHED\tHINT\n", userColumn)
+ fmt.Fprintf(tabW, "SIZE\tBKEND\tMODTIME\t%sPATH\tPIN\tHINT\n", userColumn)
}
for _, entry := range entries {
@@ -467,22 +467,15 @@ func handleList(ctx *cli.Context, ctl *client.Client) error {
userEntry = color.GreenString(userMap[entry.User]) + "\t"
}
- isCached, err := ctl.IsCached(entry.Path)
- if err != nil {
- return err
- }
- cachedState := " " + pinStateToSymbol(isCached, false)
-
fmt.Fprintf(
tabW,
- "%s\t%s\t%s\t%s%s\t%s\t%s\t%s\n",
+ "%s\t%s\t%s\t%s%s\t%s\t%s\n",
colorForSize(entry.Size)(humanize.Bytes(entry.Size)),
colorForSize(entry.Size)(humanize.Bytes(uint64(entry.CachedSize))),
entry.ModTime.Format("2006-01-02 15:04:05 MST"),
userEntry,
coloredPath,
pinState,
- cachedState,
formatHint(entry.Hint),
)
}