Fix NPE when invoking `copyNecessaryFilesFromCurrentPackage()` method on Android
Fix #2087. It looks like NPE is caused by CodePushUpdateManager.java#L79. When invoking copyNecessaryFilesFromCurrentPackage() method, If currentPackageFolderPath is null, copying currentPackageFolderPath to newUpdateFolderPath will be discarded.
Hi @robxyy , thank you for the contribution! Let me leave a couple of comments on your change.
Hi @robxyy these changes were reverted from release 8.3.0 of rn-codepush and latest 8.3.1 hotfix doesn't include them. Reason behind this is that customers reported rollbacks of update and I traced it back to these changes. If you wish to keep these changes and resolve this issue take a look https://github.com/microsoft/react-native-code-push/issues/2725
Hi @robxyy these changes were reverted from release 8.3.0 of rn-codepush and latest 8.3.1 hotfix doesn't include them. Reason behind this is that customers reported rollbacks of update and I traced it back to these changes. If you wish to keep these changes and resolve this issue take a look #2725
Sorry to hear that. I missed FileUtils.copyDirectoryContents(currentPackageFolderPath, newPackageFolderPath);, and I will push a PR later.