mirror of
https://github.com/celogeek/go-qbittorrent-sync.git
synced 2025-05-24 16:02:37 +02:00
protect args
This commit is contained in:
parent
f4d4f3075e
commit
2c197e2208
3
rsync.go
3
rsync.go
@ -4,6 +4,7 @@ import (
|
|||||||
"bufio"
|
"bufio"
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -69,6 +70,7 @@ func (r *Rsync) Run() error {
|
|||||||
"--inplace",
|
"--inplace",
|
||||||
"--no-inc-recursive",
|
"--no-inc-recursive",
|
||||||
"--info=progress2",
|
"--info=progress2",
|
||||||
|
"-s",
|
||||||
}
|
}
|
||||||
if r.Rsh != "" {
|
if r.Rsh != "" {
|
||||||
args = append(args, "--rsh", r.Rsh)
|
args = append(args, "--rsh", r.Rsh)
|
||||||
@ -78,6 +80,7 @@ func (r *Rsync) Run() error {
|
|||||||
"rsync",
|
"rsync",
|
||||||
args...,
|
args...,
|
||||||
)
|
)
|
||||||
|
cmd.Stderr = os.Stderr
|
||||||
out, err := cmd.StdoutPipe()
|
out, err := cmd.StdoutPipe()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user