Sébastien
10 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
5 deletions
-
weed/server/filer_server_handlers_write.go
|
|
@ -213,14 +213,12 @@ func (fs *FilerServer) DeleteHandler(w http.ResponseWriter, r *http.Request) { |
|
|
|
|
|
|
|
err := fs.filer.DeleteEntryMetaAndData(context.Background(), util.FullPath(objectPath), isRecursive, ignoreRecursiveError, !skipChunkDeletion, false, nil) |
|
|
|
if err != nil { |
|
|
|
glog.V(1).Infoln("deleting", objectPath, ":", err.Error()) |
|
|
|
httpStatus := http.StatusInternalServerError |
|
|
|
if err == filer_pb.ErrNotFound { |
|
|
|
httpStatus = http.StatusNoContent |
|
|
|
writeJsonQuiet(w, r, httpStatus, nil) |
|
|
|
writeJsonQuiet(w, r, http.StatusNoContent, nil) |
|
|
|
return |
|
|
|
} |
|
|
|
writeJsonError(w, r, httpStatus, err) |
|
|
|
glog.V(1).Infoln("deleting", objectPath, ":", err.Error()) |
|
|
|
writeJsonError(w, r, http.StatusInternalServerError, err) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|