fix from ensure() before actual deletion, within the b2 client library

fix https://github.com/seaweedfs/seaweedfs/issues/6483
This commit is contained in:
chrislu
2025-01-28 23:59:39 -08:00
parent 7c3a0ed874
commit 33ba88df9c

View File

@@ -79,7 +79,14 @@ func (g *B2Sink) DeleteEntry(key string, isDirectory, deleteIncludeChunks bool,
targetObject := bucket.Object(key)
return targetObject.Delete(context.Background())
err = targetObject.Delete(context.Background())
if err != nil {
// b2_download_file_by_name: 404: File with such name does not exist.
if strings.Contains(err.Error(), ": 404:") {
return nil
}
}
return err
}