Merge pull request #455 from cuishuang/main

Remove duplicate and redundant code
This commit is contained in:
xiaoyaofenfen 2024-10-29 13:49:09 +08:00 committed by GitHub
commit d45ef8c1b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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("异常:暂不支持该模式。")
} }