Skip to content

Commit e9dbaa3

Browse files
committed
fix ci failure
1 parent 2fcc7d8 commit e9dbaa3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

google/cloud/storage/internal/bucket_metadata_cache.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_BUCKET_METADATA_CACHE_H
1717

1818
#include "google/cloud/storage/version.h"
19+
#include "absl/strings/match.h"
1920
#include "absl/types/optional.h"
2021
#include <cstddef>
2122
#include <list>
@@ -52,7 +53,7 @@ class BucketMetadataCache {
5253

5354
static std::string NormalizeBucketName(std::string const& bucket) {
5455
auto const prefix = std::string("projects/_/buckets/");
55-
if (bucket.rfind(prefix, 0) == 0) {
56+
if (absl::StartsWith(bucket, prefix)) {
5657
return bucket.substr(prefix.size());
5758
}
5859
return bucket;

0 commit comments

Comments
 (0)