Skip to content

Commit 1343c60

Browse files
committed
Fix index
Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent 3684938 commit 1343c60

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/common/storage/src/operator.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ pub fn init_http_operator(cfg: &StorageHttpConfig) -> Result<Operator> {
131131
// HTTP Service is read-only and doesn't support list operation.
132132
// ImmutableIndexLayer will build an in-memory immutable index for it.
133133
let mut immutable_layer = ImmutableIndexLayer::default();
134-
let files: Vec<String> = cfg.paths.iter().map(|v| v.to_string()).collect();
134+
let files: Vec<String> = cfg
135+
.paths
136+
.iter()
137+
.map(|v| v.trim_start_matches('/').to_string())
138+
.collect();
135139
// TODO: should be replace by `immutable_layer.extend_iter()` after fix
136140
for i in files {
137141
immutable_layer.insert(i);

0 commit comments

Comments
 (0)