replacement methods for 10.4 SDK

This commit is contained in:
Riccardo Mottola 2018-01-16 22:44:02 +01:00
parent a1039484e4
commit e4d110b8b2

View File

@ -188,13 +188,22 @@ main(int argc, char **argv)
}
}
#if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4)
[fileClerk removeFileAtPath: myWebRTPath handler:nil];
#else
[fileClerk removeItemAtPath: myWebRTPath error: &errorDesc];
#endif
if (errorDesc != nil) {
NSLog(@"failed to unlink old binary file at path: %@ with error: %@", myWebRTPath, errorDesc);
@throw MakeException(@"Unable To Update", @"Failed preparation for Web Runtime update");
}
#if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4)
[fileClerk copyPath: newWebRTPath toPath: myWebRTPath handler:nil];
#else
[fileClerk copyItemAtPath: newWebRTPath toPath: myWebRTPath error: &errorDesc];
#endif
[fileClerk release];
if (errorDesc != nil) {
NSLog(@"failed to copy new webrt file: %@", errorDesc);