Azure Blobs: `ListObjects` returns paths with `blobPrefix` when a container is configured
还没有人认领这个 Issue。
评估
调研方向
从 FluentStorage.Azure.Blobs/Storage/AzureBlobStore.cs 第 532–578 行附近的列表转换开始,然后将其与第 628–656 行附近的读取路径构造进行比较。追踪固定容器和 blobPrefix 如何应用于还原出的 blob 名称;当 ListObjects 返回的 FullPath 可供 OpenRead 使用且不会重复前缀时,即为完成。
由索引模型根据 Issue 内容生成。
描述
With FluentStorage.Azure.Blobs 8.0.24 and AzureBlobStorage.FromClient(client, containerName, blobPrefix), ListObjects queries the correct Azure prefix but returns StoreObject.FullPath with the prefix still attached. Passing that path to OpenRead applies the prefix a second time.
Reproduction
Given a container named documentos containing clientes/acme/relatorio.pdf:
var store = AzureBlobStorage.FromClient(client, "documentos", "clientes/acme");
var items = await store.ListObjects(new StorageListOptions
{
FolderPath = "/",
Recurse = true,
IncludeAttributes = true
});
var file = items.Single(item => item.IsFile);
Console.WriteLine(file.FullPath);
await using var stream = await store.OpenRead(file.FullPath);
Expected: FullPath is relatorio.pdf. OpenRead addresses /documentos/clientes/acme/relatorio.pdf.
Observed: The list request has the correct prefix, but the returned path causes a duplicate prefix on read.
GET /documentos?restype=container&comp=list&prefix=clientes%2Facme%2F&include=Metadata
FullPath: clientes/acme/relatorio.pdf
HEAD /documentos/clientes/acme/clientes/acme/relatorio.pdf
Root cause
With a fixed container, AzureContainerBrowser returns blob names relative to that container. AzureBlobStore.ToStorePath tries to strip documentos/clientes/acme/ from clientes/acme/relatorio.pdf, so the name passes through unchanged. GetPartsAsync then adds clientes/acme when opening the file. [Listing conversion](https://github.com/robinrodricks/FluentStorage/blob/b91624123ca59b1c1b5ebdecd5364b2e28d86104/FluentStorage.Azure.Blobs/Storage/AzureBlobStore.cs#L532-L578) · [Read path construction](https://github.com/robinrodricks/FluentStorage/blob/b91624123ca59b1c1b5ebdecd5364b2e28d86104/FluentStorage.Azure.Blobs/Storage/AzureBlobStore.cs#L628-L656)
I generated the issue with Codex (bug at prod), if you agree I can create a PR.
- 主要语言
- C#
- 星标
- 464
- 派生
- 78
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
robinrodricks/FluentStorage 的其他 Issue
-
question
难度 2/5 1-3 小时 新手友好度 35/100
robinrodricks/FluentStorage#178 · 7 条评论 ·
-
discussion help wanted
难度 4/5 3-5 天 新手友好度 35/100
robinrodricks/FluentStorage#148 ·
-
response requested Wasabi
难度 3/5 1-2 天 新手友好度 35/100
robinrodricks/FluentStorage#121 · 2 条评论 ·
-
maintainance work in progress
难度 3/5 1-2 天 新手友好度 54/100
robinrodricks/FluentStorage#111 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
robinrodricks/FluentStorage#105 · 9 条评论 ·
查看 robinrodricks/FluentStorage 的全部 Issue
相似的 Issue
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 92/100
erkamyaman/rust-anything#943 ·
维护者通常 1 天内回复
-
priority:P2
难度 2/5 1-3 小时 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 78/100
SixLabors/ImageSharp.Drawing#438 · 1 条评论 ·
-
bug
难度 2/5 1-3 小时 新手友好度 82/100