File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 6
6
#import " CCPackageConstants.h"
7
7
#import " ccMacros.h"
8
8
#import " CCPackage_private.h"
9
+ #import " CCFileUtils.h"
9
10
10
11
@interface CCPackageDownload ()
11
12
@@ -322,8 +323,6 @@ - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLRespon
322
323
if (_fileSize == _totalBytes)
323
324
{
324
325
CCLOGINFO (@" [PACKAGE/DOWNLOAD][INFO] Download already finished. Stopping download request." );
325
- [self connectionDidFinishLoading: _connection];
326
- [self closeConnectionAndFileHandle ];
327
326
}
328
327
else if (_fileSize > _totalBytes)
329
328
{
@@ -339,8 +338,9 @@ - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLRespon
339
338
340
339
- (void )connectionDidFinishLoading : (NSURLConnection *)connection
341
340
{
341
+ [self closeConnectionAndFileHandle ];
342
342
NSError *error;
343
- if (![[NSFileManager defaultManager ] moveItemAtURL: [NSURL fileURLWithPath: _tempPath] toURL: _localURL error: &error])
343
+ if (![[[CCFileUtils sharedFileUtils ] fileManager ] moveItemAtURL: [NSURL fileURLWithPath: _tempPath] toURL: _localURL error: &error])
344
344
{
345
345
[self connection: connection didFailWithError: error];
346
346
return ;
You can’t perform that action at this time.
0 commit comments