Skip to content

Commit

Permalink
Merge pull request #28 from iSwiftLiu/master
Browse files Browse the repository at this point in the history
Repair passwords with special characters
  • Loading branch information
yannh authored Oct 28, 2021
2 parents 93c6108 + fb04431 commit 6056613
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"io"
"log"
"net/url"
"os"
"sync"

Expand Down Expand Up @@ -102,12 +103,12 @@ func realMain() int {

logger := log.New(os.Stdout, "", 0)
if db == nil {
if err = redisdump.DumpServer(*host, *port, redisPassword, *filter, *nWorkers, *withTTL, *batchSize, *noscan, logger, serializer, progressNotifs); err != nil {
if err = redisdump.DumpServer(*host, *port, url.QueryEscape(redisPassword), *filter, *nWorkers, *withTTL, *batchSize, *noscan, logger, serializer, progressNotifs); err != nil {
fmt.Fprintf(os.Stderr, "%s", err)
return 1
}
} else {
if err = redisdump.DumpDB(*host, *port, redisPassword, uint8(*db), *filter, *nWorkers, *withTTL, *batchSize, *noscan, logger, serializer, progressNotifs); err != nil {
if err = redisdump.DumpDB(*host, *port, url.QueryEscape(redisPassword), uint8(*db), *filter, *nWorkers, *withTTL, *batchSize, *noscan, logger, serializer, progressNotifs); err != nil {
fmt.Fprintf(os.Stderr, "%s", err)
return 1
}
Expand Down

0 comments on commit 6056613

Please sign in to comment.