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

[mirror config] extra rsync options (#107)

* support "rsync_options" array in config

* add test for new options

* fix tests
这个提交包含在:
Yuxiang Zhang
2020-03-09 20:48:09 +08:00
提交者 GitHub
父节点 36010dc33e
当前提交 22cfdfc9c2
共有 6 个文件被更改,包括 49 次插入34 次删除

查看文件

@@ -13,6 +13,7 @@ type rsyncConfig struct {
name string
rsyncCmd string
upstreamURL, username, password, excludeFile string
extraOptions []string
workingDir, logDir, logFile string
useIPv6, useIPv4 bool
interval time.Duration
@@ -65,6 +66,9 @@ func newRsyncProvider(c rsyncConfig) (*rsyncProvider, error) {
if c.excludeFile != "" {
options = append(options, "--exclude-from", c.excludeFile)
}
if c.extraOptions != nil {
options = append(options, c.extraOptions...)
}
provider.options = options
provider.ctx.Set(_WorkingDirKey, c.workingDir)