From 1415e81eece08947a129881138f91c91a40046e5 Mon Sep 17 00:00:00 2001 From: cuishuang Date: Fri, 27 Sep 2024 10:47:22 +0800 Subject: [PATCH] Remove duplicate and redundant code Signed-off-by: cuishuang --- internal/command/sync.go | 2 -- internal/syncdrive/sync_task.go | 2 -- 2 files changed, 4 deletions(-) diff --git a/internal/command/sync.go b/internal/command/sync.go index f8a6782..0dc7092 100644 --- a/internal/command/sync.go +++ b/internal/command/sync.go @@ -203,8 +203,6 @@ driveName - 网盘名称,backup(备份盘),resource(资源盘) } if policy == string(syncdrive.SyncPolicyExclusive) { task.Policy = syncdrive.SyncPolicyExclusive - } else if policy == string(syncdrive.SyncPolicyIncrement) { - task.Policy = syncdrive.SyncPolicyIncrement } else { task.Policy = syncdrive.SyncPolicyIncrement } diff --git a/internal/syncdrive/sync_task.go b/internal/syncdrive/sync_task.go index 97b693f..ed50cf0 100644 --- a/internal/syncdrive/sync_task.go +++ b/internal/syncdrive/sync_task.go @@ -245,8 +245,6 @@ func (t *SyncTask) Start() error { go t.scanLocalFile(t.ctx) } else if t.Mode == Download { go t.scanPanFile(t.ctx) - } else if t.Mode == SyncTwoWay { - return fmt.Errorf("异常:暂不支持该模式。") } else { return fmt.Errorf("异常:暂不支持该模式。") }