Skip to content

Commit 176e6f8

Browse files
committed
fix ci failure
1 parent ec4cd25 commit 176e6f8

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>
@@ -51,7 +52,7 @@ class BucketMetadataCache {
5152

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

0 commit comments

Comments
 (0)