Skip to content

Commit 7edc787

Browse files
authored
Update resumable_downloader.py
1 parent ef557f8 commit 7edc787

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

qcloud_cos/resumable_downloader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +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-
return '{0}_{1}.{2}'.format(self.__bucket, self.__key, get_md5(self.__dest_file_path))
76+
dest_file_path_md5 = hashlib.md5(dest_file_path).hexdigest()
77+
return '{0}_{1}.{2}'.format(self.__bucket, self.__key, dest_file_path_md5)
7778

7879
def __determine_part_size_internal(self, file_size, part_size):
7980
real_part_size = part_size * 1024 * 1024 # MB

0 commit comments

Comments
 (0)