From: Urban Wallasch Date: Fri, 5 Apr 2019 15:04:00 +0000 (+0200) Subject: * Display symbolic links like regular files and directories, do not expose the the... X-Git-Tag: v0.2~8 X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=46389051b382ad9db4c167d3d0935538ea1803f5;p=gogopherd.git * Display symbolic links like regular files and directories, do not expose the the target path. --- 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 } } }