@@ -39,7 +39,7 @@ - (BOOL)installWithError:(NSError **)error
39
39
NSAssert (installData != nil , @" installData must not be nil" );
40
40
NSAssert (installData.unzipURL != nil , @" installData.unzipURL must not be nil" );
41
41
42
- if (![self packageExists : error])
42
+ if (![self unzippedPackageFolderExists : error])
43
43
{
44
44
[_package setValue: @(CCPackageStatusInstallationFailed) forKey: @" status" ];
45
45
return NO ;
@@ -88,7 +88,7 @@ - (BOOL)movePackageToInstallPathWithError:(NSError **)error
88
88
[_package setValue: nil forKey: @" installURL" ];
89
89
90
90
[self setNewError: error
91
- code: PACKAGE_ERROR_INSTALL_COULD_NOT_MOVE_PACKAGE
91
+ code: PACKAGE_ERROR_INSTALL_COULD_NOT_MOVE_PACKAGE_TO_INSTALL_FOLDER
92
92
message: [NSString stringWithFormat: @" Could not move package to install path \" %@ \" , underlying error: %@ " , _installPath, errorMove]
93
93
underlyingError: errorMove];
94
94
@@ -100,7 +100,7 @@ - (BOOL)movePackageToInstallPathWithError:(NSError **)error
100
100
return YES ;
101
101
}
102
102
103
- - (BOOL )packageExists : (NSError **)error
103
+ - (BOOL )unzippedPackageFolderExists : (NSError **)error
104
104
{
105
105
CCPackageInstallData *installData = [_package installData ];
106
106
NSAssert (installData.unzipURL, @" installData.unzipURL must not be nil" );
@@ -109,7 +109,7 @@ - (BOOL)packageExists:(NSError **)error
109
109
if (![fileManager fileExistsAtPath: installData.unzipURL.path])
110
110
{
111
111
[self setNewError: error
112
- code: PACKAGE_ERROR_INSTALL_PACKAGE_NOT_FOUND
112
+ code: PACKAGE_ERROR_INSTALL_UNZIPPED_PACKAGE_NOT_FOUND
113
113
message: [NSString stringWithFormat: @" Package to install not found at path \" %@ \" " , installData.unzipURL]];
114
114
115
115
CCLOG (@" [PACKAGE/INSTALL][ERROR] Moving unzipped package to installation folder, package already exists! %@ " , *error);
0 commit comments