Successive requires value of true, instead of any non-null value
This commit is contained in:
parent
5f9dd5f607
commit
8e1ab46302
|
@ -10,7 +10,7 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var Version = "0.12.1"
|
||||
var Version = "0.12.2"
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(versionCmd)
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue