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 66#import " CCPackageConstants.h"
77#import " ccMacros.h"
88#import " CCPackage_private.h"
9+ #import " CCFileUtils.h"
910
1011@interface CCPackageDownload ()
1112
@@ -322,8 +323,6 @@ - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLRespon
322323 if (_fileSize == _totalBytes)
323324 {
324325 CCLOGINFO (@" [PACKAGE/DOWNLOAD][INFO] Download already finished. Stopping download request." );
325- [self connectionDidFinishLoading: _connection];
326- [self closeConnectionAndFileHandle ];
327326 }
328327 else if (_fileSize > _totalBytes)
329328 {
@@ -339,8 +338,9 @@ - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLRespon
339338
340339- (void )connectionDidFinishLoading : (NSURLConnection *)connection
341340{
341+ [self closeConnectionAndFileHandle ];
342342 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])
344344 {
345345 [self connection: connection didFailWithError: error];
346346 return ;
You can’t perform that action at this time.
0 commit comments