镜像自地址
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
这个提交包含在:
@@ -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)
|
||||
|
||||
在新工单中引用
屏蔽一个用户