From a9f24af938374d06c72ff7efdc947a1cfe9ad4dd Mon Sep 17 00:00:00 2001 From: lowzj Date: Tue, 19 May 2020 22:54:22 +0800 Subject: [PATCH] fix: don't delete the parent directory of the task file Signed-off-by: lowzj --- supernode/daemon/mgr/cdn/path_util.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/supernode/daemon/mgr/cdn/path_util.go b/supernode/daemon/mgr/cdn/path_util.go index cdbb99e3c..285e39910 100644 --- a/supernode/daemon/mgr/cdn/path_util.go +++ b/supernode/daemon/mgr/cdn/path_util.go @@ -69,13 +69,6 @@ func getMd5DataRaw(taskID string) *store.Raw { } } -func getParentRaw(taskID string) *store.Raw { - return &store.Raw{ - Bucket: config.DownloadHome, - Key: getParentKey(taskID), - } -} - func getHomeRaw() *store.Raw { return &store.Raw{ Bucket: config.DownloadHome, @@ -98,10 +91,5 @@ func deleteTaskFiles(ctx context.Context, cacheStore *store.Store, taskID string return err } - if err := cacheStore.Remove(ctx, getParentRaw(taskID)); err != nil && - !store.IsKeyNotFound(err) { - return err - } - return nil }