diff --git a/modules/server/server.go b/modules/server/server.go index 8cedbd4..b253de5 100644 --- a/modules/server/server.go +++ b/modules/server/server.go @@ -286,23 +286,25 @@ func generateArchiveIndex(fsPath string, urlPath string) (string, error) { urlPath = basePath(strings.TrimPrefix(urlPath, "/archive")) var b strings.Builder + b.WriteString("\n
")
- if urlPath != "/archive" && urlPath != "/archive/" {
- up := path.Dir(urlPath)
- if up == "." {
- up = "/archive"
- }
- if !strings.HasSuffix(up, "/") {
- up = "/archive" + filepath.Dir(up) + "/"
- }
- b.WriteString(`../` + "\n")
+
+ if urlPath != "/" {
+ b.WriteString(
+ `../` + "\n",
+ )
} else {
- b.WriteString(`../` + "\n")
+ b.WriteString(
+ `../` + "\n",
+ )
}
+
nameCol := 50
for _, ei := range list {
escapedName := template.HTMLEscapeString(ei.name)
diff --git a/modules/version/version.go b/modules/version/version.go
index 9aa6beb..589ef13 100644
--- a/modules/version/version.go
+++ b/modules/version/version.go
@@ -9,7 +9,7 @@ var gitCommit string = "devel"
const PROGRAM_NAME string = "fes"
const PROGRAM_NAME_LONG string = "fes/fSD"
-const VERSION string = "0.2.0"
+const VERSION string = "0.2.1"
func Version() {
fmt.Printf("%s version %s\n", PROGRAM_NAME_LONG, VERSION)