From 8e1ab463024084287b1cfca49649d35aa716b383 Mon Sep 17 00:00:00 2001 From: Seednode Date: Sun, 25 Sep 2022 11:30:52 -0500 Subject: [PATCH] Successive requires value of true, instead of any non-null value --- cmd/version.go | 2 +- cmd/web.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/version.go b/cmd/version.go index fed0ab1..0247e00 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -10,7 +10,7 @@ import ( "github.com/spf13/cobra" ) -var Version = "0.12.1" +var Version = "0.12.2" func init() { rootCmd.AddCommand(versionCmd) diff --git a/cmd/web.go b/cmd/web.go index bf18155..f35cb8f 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -142,7 +142,7 @@ func serveHtmlHandler(paths []string) http.HandlerFunc { successive := r.URL.Query().Get("s") switch { - case r.URL.Path == "/" && successive != "" && refererUri != "": + case r.URL.Path == "/" && successive == "true" && refererUri != "": query, err := url.QueryUnescape(refererUri) if err != nil { log.Fatal(err) @@ -171,7 +171,7 @@ func serveHtmlHandler(paths []string) http.HandlerFunc { newUrl := fmt.Sprintf("%v%v?f=%v&s=%v", r.URL.Host, filePath, filter, successive) http.Redirect(w, r, newUrl, http.StatusSeeOther) - case r.URL.Path == "/" && successive != "" && refererUri == "": + case r.URL.Path == "/" && successive == "true" && refererUri == "": filePath, err := pickFile(paths, filter, successive) switch { case err != nil && err == ErrNoImagesFound: