Skip to content

Commit 8a748d4

Browse files
committed
Merge branch 'fix-plain-rw-loading' of github.com:jkartseva/ClickHouse into fix-plain-rw-loading
2 parents f9c2e0f + 36684d8 commit 8a748d4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Disks/ObjectStorages/MetadataStorageFromPlainRewritableObjectStorage.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ void MetadataStorageFromPlainRewritableObjectStorage::load(bool is_initial_load)
178178
}
179179

180180
/// Check that the file is a direct child.
181-
if (remote_file_path.substr(full_prefix_length) == filename)
181+
chassert(full_prefix_length < remote_file_path.size());
182+
if (std::string_view(remote_file_path.data() + full_prefix_length) == filename)
182183
files.insert(std::move(filename));
183184
}
184185

0 commit comments

Comments
 (0)