Remove duplicate and redundant code

Signed-off-by: cuishuang <imcusg@gmail.com>
This commit is contained in:
cuishuang 2024-09-27 10:47:22 +08:00
parent 7ebaf6ec17
commit 1415e81eec
2 changed files with 0 additions and 4 deletions

View File

@ -203,8 +203,6 @@ driveName - 网盘名称backup(备份盘)resource(资源盘)
} }
if policy == string(syncdrive.SyncPolicyExclusive) { if policy == string(syncdrive.SyncPolicyExclusive) {
task.Policy = syncdrive.SyncPolicyExclusive task.Policy = syncdrive.SyncPolicyExclusive
} else if policy == string(syncdrive.SyncPolicyIncrement) {
task.Policy = syncdrive.SyncPolicyIncrement
} else { } else {
task.Policy = syncdrive.SyncPolicyIncrement task.Policy = syncdrive.SyncPolicyIncrement
} }

View File

@ -245,8 +245,6 @@ func (t *SyncTask) Start() error {
go t.scanLocalFile(t.ctx) go t.scanLocalFile(t.ctx)
} else if t.Mode == Download { } else if t.Mode == Download {
go t.scanPanFile(t.ctx) go t.scanPanFile(t.ctx)
} else if t.Mode == SyncTwoWay {
return fmt.Errorf("异常:暂不支持该模式。")
} else { } else {
return fmt.Errorf("异常:暂不支持该模式。") return fmt.Errorf("异常:暂不支持该模式。")
} }