Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1353 from lowzj/fix-deleteTaskFiles
Browse files Browse the repository at this point in the history
fix: don't delete the parent directory of the task file

backport to 1.0.x
  • Loading branch information
lowzj committed May 22, 2020
2 parents 386e25f + b23342a commit 6eb2e96
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions supernode/daemon/mgr/cdn/path_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
}

0 comments on commit 6eb2e96

Please sign in to comment.