Skip to content

Conversation

@minodisk
Copy link

Summary

  • Fix GCS List method returning full paths (attrs.Name) instead of relative paths (key with prefix stripped)
  • Align behavior with other storage implementations (S3, Local, Azure, Aliyun, Tencent, Huawei, Volcengine)
  • Add test assertion to verify that List returns relative paths

Background

The original implementation in dify-plugin-daemon PR #237 correctly used key, but it was mistakenly changed to attrs.Name when ported to dify-cloud-kit.

Test plan

  • Verified GCS List method returns relative paths

The GCS List method was returning full paths (attrs.Name) instead of
relative paths (key with prefix stripped). This was inconsistent with
other storage implementations (S3, Local, Azure, Aliyun, Tencent,
Huawei, Volcengine) which all return relative paths.

The original implementation in dify-plugin-daemon PR #237 correctly
used `key`:
https://github.com/langgenius/dify-plugin-daemon/pull/237/files#diff-1efde200d0fa3fafdd827478fdbca6e8b16dee52955cb3c93faab2849f7d95bfR136

This bug was introduced when the code was ported to dify-cloud-kit.

Also added a test assertion to verify that List returns relative paths.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant