Browse Source

skip error when deletion failed

pull/747/head
Chris Lu 6 years ago
parent
commit
06c43286cd
  1. 4
      weed/operation/delete_content.go

4
weed/operation/delete_content.go

@ -12,6 +12,7 @@ import (
"github.com/chrislusf/seaweedfs/weed/security" "github.com/chrislusf/seaweedfs/weed/security"
"github.com/chrislusf/seaweedfs/weed/util" "github.com/chrislusf/seaweedfs/weed/util"
"github.com/chrislusf/seaweedfs/weed/glog"
) )
type DeleteResult struct { type DeleteResult struct {
@ -32,7 +33,8 @@ func DeleteFromVolumeServer(fileUrlOnVolume string, jwt security.EncodedJwt) err
func DeleteFile(master string, fileId string, jwt security.EncodedJwt) error { func DeleteFile(master string, fileId string, jwt security.EncodedJwt) error {
fileUrl, err := LookupFileId(master, fileId) fileUrl, err := LookupFileId(master, fileId)
if err != nil { if err != nil {
return fmt.Errorf("Failed to lookup %s:%v", fileId, err)
glog.V(0).Infof("Delete %s lookup: %v, master: %s", fileId, err, master)
return nil
} }
err = util.Delete(fileUrl, jwt) err = util.Delete(fileUrl, jwt)
if err != nil { if err != nil {

Loading…
Cancel
Save