From 46389051b382ad9db4c167d3d0935538ea1803f5 Mon Sep 17 00:00:00 2001 From: Urban Wallasch Date: Fri, 5 Apr 2019 17:04:00 +0200 Subject: [PATCH] * Display symbolic links like regular files and directories, do not expose the the target path. --- gogopherd.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gogopherd.go b/gogopherd.go index 1f8c786..4155a53 100644 --- a/gogopherd.go +++ b/gogopherd.go @@ -62,11 +62,11 @@ func createIndex(selector string) (string, error) { if check(err, "Stat "+path) == nil { if lfi.IsDir() { // link points to a directory - list += "1" + fi.Name() + " -> " + linktarget + "\t" + selector + pathSep + fi.Name() + loc + list += "1" + fi.Name() + "\t" + selector + pathSep + fi.Name() + loc } else if lfi.Mode().IsRegular() { // link points to a regular file ftype, _ := guessFiletype(dirname + pathSep + fi.Name()) - list += ftype + fi.Name() + " -> " + linktarget + "\t" + selector + pathSep + fi.Name() + loc + list += ftype + fi.Name() + " (" + humanSize(lfi.Size()) + ")\t" + selector + pathSep + fi.Name() + loc } } } -- 2.30.2