Revision 518ea63b
b/pithos-macos/PithosBrowserController.m | ||
---|---|---|
1293 | 1293 |
NSUInteger blockSize = [[containerRequest.userInfo objectForKey:@"blockSize"] unsignedIntegerValue]; |
1294 | 1294 |
NSString *fileName = [containerRequest.userInfo objectForKey:@"fileName"]; |
1295 | 1295 |
PithosActivity *activity = [containerRequest.userInfo objectForKey:@"activity"]; |
1296 |
NSUInteger totalBytes = activity.totalBytes; |
|
1297 |
NSUInteger currentBytes = activity.currentBytes + blockSize; |
|
1298 |
if (currentBytes > totalBytes) |
|
1299 |
currentBytes = totalBytes; |
|
1300 | 1296 |
if (containerRequest.responseStatusCode == 202) { |
1301 |
[activityFacility updateActivity:activity |
|
1302 |
withMessage:[NSString stringWithFormat:@"Uploading '%@' (%.0f%%)", fileName, (100*(currentBytes + 0.0)/(totalBytes + 0.0))] |
|
1303 |
totalBytes:totalBytes |
|
1304 |
currentBytes:currentBytes]; |
|
1305 | 1297 |
NSIndexSet *missingBlocks = [containerRequest.userInfo objectForKey:@"missingBlocks"]; |
1306 | 1298 |
NSUInteger missingBlockIndex = [[containerRequest.userInfo objectForKey:@"missingBlockIndex"] unsignedIntegerValue]; |
1307 | 1299 |
missingBlockIndex = [missingBlocks indexGreaterThanIndex:missingBlockIndex]; |
b/pithos-macos/PithosSyncDaemon.m | ||
---|---|---|
98 | 98 |
} |
99 | 99 |
|
100 | 100 |
queue = [[ASINetworkQueue alloc] init]; |
101 |
queue.showAccurateProgress = YES; |
|
101 | 102 |
queue.shouldCancelAllRequestsOnFailure = NO; |
102 | 103 |
[queue go]; |
103 | 104 |
|
... | ... | |
1328 | 1329 |
if (containerRequest.responseStatusCode == 202) { |
1329 | 1330 |
ASIPithosObject *object = [containerRequest.userInfo objectForKey:@"pithosObject"]; |
1330 | 1331 |
PithosActivity *activity = [containerRequest.userInfo objectForKey:@"activity"]; |
1331 |
NSUInteger totalBytes = activity.totalBytes; |
|
1332 |
NSUInteger currentBytes = activity.currentBytes + blockSize; |
|
1333 |
if (currentBytes > totalBytes) |
|
1334 |
currentBytes = totalBytes; |
|
1335 |
[activityFacility updateActivity:activity |
|
1336 |
withMessage:[NSString stringWithFormat:@"Sync: Uploading '%@' (%.0f%%)", object.name, (100*(currentBytes + 0.0)/(totalBytes + 0.0))] |
|
1337 |
totalBytes:totalBytes |
|
1338 |
currentBytes:currentBytes]; |
|
1339 | 1332 |
NSIndexSet *missingBlocks = [containerRequest.userInfo objectForKey:@"missingBlocks"]; |
1340 | 1333 |
NSUInteger missingBlockIndex = [[containerRequest.userInfo objectForKey:@"missingBlockIndex"] unsignedIntegerValue]; |
1341 | 1334 |
missingBlockIndex = [missingBlocks indexGreaterThanIndex:missingBlockIndex]; |
Also available in: Unified diff