Skip to content

Commit

Permalink
Merge pull request #789 from deepmodeling/zjgemi
Browse files Browse the repository at this point in the history
fix: add prefix when upload_s3 with key
  • Loading branch information
zjgemi authored Apr 1, 2024
2 parents 184e3f2 + fed4697 commit be0cb8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dflow/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,9 @@ def upload_s3(
else:
client = MinioClient(**kwargs)
if key is not None:
pass
if not key.startswith(s3_config["prefix"]) and not any(
[key.startswith(p) for p in s3_config["extra_prefixes"]]):
key = s3_config["prefix"] + key
elif prefix is not None:
if prefix[-1] != "/":
prefix += "/"
Expand Down

0 comments on commit be0cb8a

Please sign in to comment.