Only emit *-symlink with -v set

This commit is contained in:
2025-12-03 17:55:27 +01:00
parent fc62cd39be
commit 12e91032a1

View File

@@ -322,12 +322,16 @@ func ReadDirEntries(dirPath string, opts *Options) ([]FileEntry, error) {
entry.Size = -1
entry.SizePretty = "—"
entry.IconType = "folder-symlink"
if opts.Verbose {
fmt.Printf("dir-symlink %s\n", fullPath)
}
} else if !file.IsDir() && entry.IsSymlink {
entry.Size = info.Size()
entry.SizePretty = PrettySize(entry.Size)
entry.IconType = "symlink"
if opts.Verbose {
fmt.Printf("file-symlink %s\n", fullPath)
}
} else {
entry.Size = info.Size()
entry.SizePretty = PrettySize(entry.Size)