File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " cos-nodejs-sdk-v5" ,
3- "version" : " 2.15.1 " ,
3+ "version" : " 2.15.2 " ,
44 "description" : " cos nodejs sdk v5" ,
55 "main" : " index.js" ,
66 "types" : " index.d.ts" ,
Original file line number Diff line number Diff line change @@ -1614,9 +1614,11 @@ function downloadFile(params, callback) {
16141614
16151615 // 只校验文件大小和 crc64 是否有变更
16161616 var changed ;
1617- if ( chunkHeaders [ 'x-cos-hash-crc64ecma' ] !== head . crc64ecma )
1617+ if ( chunkHeaders [ 'x-cos-hash-crc64ecma' ] && head . crc64ecma && chunkHeaders [ 'x-cos-hash-crc64ecma' ] !== head . crc64ecma ) {
16181618 changed = 'download error, x-cos-hash-crc64ecma has changed.' ;
1619- else if ( totalSize !== head . size ) changed = 'download error, Last-Modified has changed.' ;
1619+ } else if ( totalSize !== head . size ) {
1620+ changed = 'download error, Last-Modified has changed.' ;
1621+ }
16201622 // else if (data.ETag !== head.ETag) error = 'download error, ETag has changed.';
16211623 // else if (chunkHeaders['last-modified'] !== head.mtime) error = 'download error, Last-Modified has changed.';
16221624
You can’t perform that action at this time.
0 commit comments