1
0
镜像自地址 https://github.com/tuna/tunasync.git 已同步 2025-12-07 06:56:47 +00:00

fix misuse of variables

这个提交包含在:
zyx
2020-03-16 21:59:30 +08:00
父节点 b490c22984
当前提交 9eb72c5db0
共有 2 个文件被更改,包括 6 次插入6 次删除

查看文件

@@ -52,13 +52,13 @@ func newRsyncProvider(c rsyncConfig) (*rsyncProvider, error) {
provider.rsyncCmd = "rsync" provider.rsyncCmd = "rsync"
} }
if c.rsyncEnv == nil { if c.rsyncEnv == nil {
c.rsyncEnv = map[string]string{} provider.rsyncEnv = map[string]string{}
} }
if c.username != "" { if c.username != "" {
c.rsyncEnv["USER"] = c.username provider.rsyncEnv["USER"] = c.username
} }
if c.password != "" { if c.password != "" {
c.rsyncEnv["RSYNC_PASSWORD"] = c.password provider.rsyncEnv["RSYNC_PASSWORD"] = c.password
} }
options := []string{ options := []string{

查看文件

@@ -71,13 +71,13 @@ func newTwoStageRsyncProvider(c twoStageRsyncConfig) (*twoStageRsyncProvider, er
} }
if c.rsyncEnv == nil { if c.rsyncEnv == nil {
c.rsyncEnv = map[string]string{} provider.rsyncEnv = map[string]string{}
} }
if c.username != "" { if c.username != "" {
c.rsyncEnv["USER"] = c.username provider.rsyncEnv["USER"] = c.username
} }
if c.password != "" { if c.password != "" {
c.rsyncEnv["RSYNC_PASSWORD"] = c.password provider.rsyncEnv["RSYNC_PASSWORD"] = c.password
} }
if c.rsyncCmd == "" { if c.rsyncCmd == "" {
provider.rsyncCmd = "rsync" provider.rsyncCmd = "rsync"