This commit is contained in:
2023-03-11 15:45:59 +08:00
parent 747ded460a
commit 786b0c7ce9
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ func listDir(dir string) ([]FileInfo, error) {
}
Href := filepath.Join(dir, name)
//Href = strings.Replace(Href, filepath.Join(rootPath), "", -1)
Href = strings.Replace(Href, filepath.Join(rootPath), "", -1)
size := fileInfo.Size()
formattedSize := formatFileSize(size)
+2 -2
View File
@@ -12,9 +12,9 @@
{{range .}}
<tr>
{{if .IsDir}}
<td><a href="/{{.Href}}">/{{.Name}}</a></td>
<td><a href="{{.Href}}">/{{.Name}}</a></td>
{{else}}
<td><a href="/{{.Href}}">{{.Name}}</a></td>
<td><a href="{{.Href}}">{{.Name}}</a></td>
{{end}}
<td>{{.Size}}</td>
</tr>