Skip to content

Commit ad27057

Browse files
committed
fix bug
1 parent 0d782cc commit ad27057

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qcloud_cos/resumable_downloader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ def start(self):
7373
logger.debug('download success, bucket: {0}, key: {1}'.format(self.__bucket, self.__key))
7474

7575
def __get_record_filename(self, bucket, key, dest_file_path):
76-
dest_file_path_md5 = hashlib.md5(dest_file_path).hexdigest()
77-
key_md5 = hashlib.md5(key).hexdigest()
76+
dest_file_path_md5 = hashlib.md5(dest_file_path.encode("utf-8")).hexdigest()
77+
key_md5 = hashlib.md5(key.encode("utf-8")).hexdigest()
7878
return '{0}_{1}.{2}'.format(bucket, key_md5, dest_file_path_md5)
7979

8080
def __determine_part_size_internal(self, file_size, part_size):

0 commit comments

Comments
 (0)