Skip to content

Commit 4c6dc87

Browse files
author
karisli
committed
# 5.8.9
- 一些修复
1 parent cec8772 commit 4c6dc87

File tree

10 files changed

+32
-22
lines changed

10 files changed

+32
-22
lines changed

CHANGELOG.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
# 5.8.8
2-
- 修复低版本mac的crash
3-
- 其他修复
1+
# 5.8.9
2+
- 一些修复
3+
4+
# 5.8.8
45

6+
修复低版本mac的crash
7+
其他修复
58

69
# 5.8.7
710
- 支持图片标签识别/-支持

QCloudCOSXML.podspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "QCloudCOSXML"
33

4-
s.version = "5.8.8"
4+
s.version = "5.8.9"
55

66
s.summary = "QCloudCOSXML 腾讯云iOS-SDK组件"
77

@@ -20,15 +20,15 @@ s.version = "5.8.8"
2020
s.subspec 'Default' do |default|
2121
default.source_files = 'QCloudCOSXML/Classes/**/*','Models/request.model','QCloudCOSXML/Classes/QCloudCOSXML/*'
2222

23-
default.dependency "QCloudCore",'5.8.8'
23+
default.dependency "QCloudCore",'5.8.9'
2424
end
2525
s.subspec 'Slim' do |slim|
2626
slim.source_files = 'QCloudCOSXML/Classes/**/*','Models/request.model','QCloudCOSXML/Classes/QCloudCOSXML/*'
27-
slim.dependency "QCloudCore/WithoutMTA",'5.8.8'
27+
slim.dependency "QCloudCore/WithoutMTA",'5.8.9'
2828
end
2929
s.subspec 'Transfer' do |transfer|
3030
transfer.source_files = 'QCloudCOSXML/Classes/*','QCloudCOSXML/Classes/Transfer/**/*','QCloudCOSXML/Classes/Base/**/*'
31-
transfer.dependency "QCloudCore/WithoutMTA",'5.8.8'
31+
transfer.dependency "QCloudCore/WithoutMTA",'5.8.9'
3232
end
3333

3434
end

QCloudCOSXML/Classes/QCloudCOSXMLVersion.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#import "QCloudCOSXMLVersion.h"
2-
NSString * const QCloudCOSXMLModuleVersion = @"5.8.8";
2+
NSString * const QCloudCOSXMLModuleVersion = @"5.8.9";
33
NSString * const QCloudCOSXMLModuleName = @"QCloudCOSXML";
44
@interface QCloudQCloudCOSXMLLoad : NSObject
55
@end

QCloudCOSXML/Classes/Transfer/request/QCloudCOSXMLUploadObjectRequest.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,15 +371,17 @@ - (void)startMultiUpload {
371371
return nil;
372372
}
373373
NSURL *url = (NSURL *)self.body;
374-
self.dataContentLength = QCloudFileSize(url.relativePath);
374+
if([self.body isKindOfClass:NSURL.class]){
375+
self.dataContentLength = QCloudFileSize(url.relativePath);
376+
}
375377
int64_t restContentLength = self.dataContentLength - uploadedSize;
376378
//便宜的起始位置
377379
int64_t offset = uploadedSize;
378380
for (int i = startPartNumber;; i++) {
379381
int64_t slice = 0;
380-
NSUInteger maxSlice = ceil(QCloudFileSize(url.relativePath) * 1.0 / (10000));
382+
NSUInteger maxSlice = ceil(self.dataContentLength * 1.0 / (10000));
381383
NSUInteger uploadSliceLength = self.sliceSize > 10 ? self.sliceSize : kQCloudCOSXMLUploadSliceLength;
382-
uploadSliceLength = (QCloudFileSize(url.relativePath) * 1.0 / uploadSliceLength) > 10000 ? maxSlice : uploadSliceLength;
384+
uploadSliceLength = self.dataContentLength * 1.0 / uploadSliceLength > 10000 ? maxSlice : uploadSliceLength;
383385
if (restContentLength >= uploadSliceLength) {
384386
slice = uploadSliceLength;
385387
} else {
@@ -565,14 +567,12 @@ - (void)finishUpload:(NSString *)uploadId {
565567
NSLog(@"finishUpload canceled = %d",self.canceled?1:0);
566568
return;
567569
}
568-
NSInteger fileSize = QCloudFileSize(url.relativePath);
569-
if (fileSize != self.dataContentLength || !self.uploadBodyIsCompleted) {
570+
if(!self.uploadBodyIsCompleted){
570571
NSError *error = [NSError qcloud_errorWithCode:QCloudNetworkErrorCodeImCompleteData
571572
message:@"DataIntegrityError分片:文件大小与原始文件大小不一致,请检查文件在上传的过程中是否发生改变"];
572573
[self onError:error];
573574
return;
574575
}
575-
576576
QCloudCompleteMultipartUploadRequest *complete = [QCloudCompleteMultipartUploadRequest new];
577577
complete.enableQuic = self.enableQuic;
578578
complete.object = self.object;

QCloudCore.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Pod::Spec.new do |s|
1010
s.name = "QCloudCore"
1111

12-
s.version = "5.8.8"
12+
s.version = "5.8.9"
1313

1414

1515
s.summary = "QCloudCore--腾讯云iOS-SDK Foundation"

QCloudCore/Classes/Base/QCLOUDRestNet/SessionSupport/QCloudURLSessionTaskData.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#import "QCloudHTTPRetryHanlder.h"
1111
#import <objc/runtime.h>
1212
#import "QCloudFileUtils.h"
13-
13+
#import "QCloudLogger.h"
1414
@interface QCloudURLSessionTaskData () {
1515
NSMutableData *_cacheData;
1616
NSFileHandle *_writeFileHandler;
@@ -84,7 +84,11 @@ - (NSData *)data {
8484
- (void)appendData:(NSData *)data {
8585
if (_writeFileHandler && !_forbidenWirteToFile) {
8686
@synchronized(_writeFileHandler) {
87-
[_writeFileHandler writeData:data];
87+
@try {
88+
[_writeFileHandler writeData:data];
89+
} @catch (NSException *exception) {
90+
QCloudLogError(@"no space left on device");
91+
}
8892
}
8993
} else {
9094
@synchronized(_cacheData) {

QCloudCore/Classes/Base/QCloudCoreVersion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#ifndef QCloudCoreModuleVersion_h
77
#define QCloudCoreModuleVersion_h
8-
#define QCloudCoreModuleVersionNumber 508007
8+
#define QCloudCoreModuleVersionNumber 508009
99

1010
// dependency
1111

QCloudCore/Classes/Base/QCloudCoreVersion.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#import "QCloudCoreVersion.h"
2-
NSString *const QCloudCoreModuleVersion = @"5.8.7";
2+
NSString *const QCloudCoreModuleVersion = @"5.8.9";
33
NSString *const QCloudCoreModuleName = @"QCloudCore";
44
@interface QCloudQCloudCoreLoad : NSObject
55
@end

QCloudCore/Classes/Base/Supervisory/QCloudSupervisory.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,11 @@ - (void)flushSession:(QCloudSupervisorySession *)session {
163163
NSFileHandle *fileHandler = [NSFileHandle fileHandleForWritingAtPath:self.supervisoryLogFilePath];
164164
[data appendData:[@"\n#sss884hjksdhfjasdf\n" dataUsingEncoding:NSUTF8StringEncoding]];
165165
[fileHandler seekToEndOfFile];
166-
[fileHandler writeData:data];
167-
[fileHandler closeFile];
166+
@try {
167+
[fileHandler writeData:data];
168+
} @catch (NSException *exception) {
169+
QCloudLogError(@"no space left on device");
170+
}
168171
}
169172
}
170173

QCloudQuic.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Pod::Spec.new do |s|
1010
s.name = "QCloudQuic"
1111

12-
s.version = "5.8.8"
12+
s.version = "5.8.9"
1313

1414
s.summary = "QCloudQuic 腾讯云iOS-SDK组件"
1515

0 commit comments

Comments
 (0)