|
|
|
@ -127,7 +127,7 @@ func handleDirectory(client *core.Client, file *os.File, p *core.Path) *errors.E
|
|
|
|
|
|
|
|
|
|
// Add directory heading, empty line and a back line
|
|
|
|
|
dirContents = append(dirContents, []byte("["+core.Hostname+p.Selector()+"]\n\n")...)
|
|
|
|
|
dirContents = append(dirContents, []byte("=> /"+dirSel+" ..\n")...)
|
|
|
|
|
dirContents = append(dirContents, []byte("=> "+dirSel+" ..\n")...)
|
|
|
|
|
|
|
|
|
|
// Scan directory and build lines
|
|
|
|
|
err = core.ScanDirectory(
|
|
|
|
@ -137,6 +137,11 @@ func handleDirectory(client *core.Client, file *os.File, p *core.Path) *errors.E
|
|
|
|
|
// Calculate escaped selector path
|
|
|
|
|
sel := core.EscapePath(fp.Selector())
|
|
|
|
|
|
|
|
|
|
// If it's a dir, append final '/' to selector
|
|
|
|
|
if file.IsDir() {
|
|
|
|
|
sel += "/"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Append new formatted file listing
|
|
|
|
|
dirContents = append(dirContents, []byte("=> "+sel+" "+file.Name()+"\n")...)
|
|
|
|
|
},
|
|
|
|
|