* Display symbolic links like regular files and directories, do not expose the the...
authorUrban Wallasch <urban.wallasch@freenet.de>
Fri, 5 Apr 2019 15:04:00 +0000 (17:04 +0200)
committerUrban Wallasch <urban.wallasch@freenet.de>
Fri, 5 Apr 2019 15:04:00 +0000 (17:04 +0200)
gogopherd.go

index 1f8c786bb8ee779302c6bebfbd16ce31ccac52c1..4155a531662a49c001a3f025f67294d65da2b2cc 100644 (file)
@@ -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
                                        }
                                }
                        }