Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare temporary directory when fget_object #1309

Merged
merged 1 commit into from
Sep 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions minio/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
ThreadPool, check_bucket_name, check_non_empty_string,
check_sse, check_ssec, genheaders, get_part_info,
headers_to_strings, is_valid_policy_type, makedirs,
md5sum_hash, read_part_data, sha256_hash)
md5sum_hash, read_part_data, sha256_hash, queryencode)
from .legalhold import LegalHold
from .lifecycleconfig import LifecycleConfig
from .notificationconfig import NotificationConfig
Expand Down Expand Up @@ -1043,7 +1043,9 @@ def fget_object(self, bucket_name, object_name, file_path,
)

# Write to a temporary file "file_path.part.minio" before saving.
tmp_file_path = tmp_file_path or f"{file_path}.{stat.etag}.part.minio"
tmp_file_path = (
tmp_file_path or f"{file_path}.{queryencode(stat.etag)}.part.minio"
)

response = None
try:
Expand Down