Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

second version update fail #11

Open
tuanpham1815 opened this issue Dec 19, 2024 · 1 comment
Open

second version update fail #11

tuanpham1815 opened this issue Dec 19, 2024 · 1 comment

Comments

@tuanpham1815
Copy link

tuanpham1815 commented Dec 19, 2024

override fun setupBundlePath(path: String?, extension: String?, promise: Promise) { if (path != null) { deleteOldBundleIfneeded()

this line delete new zip bundle so we can't extract zip => update fail.

Hopefully, you will fix it in next version

here is my temp solution:

private fun deleteDirectory(directory: File): Boolean { if (directory.isDirectory) { // List all files and directories in the current directory val files = directory.listFiles() if (files != null) { // Recursively delete all files and directories for (file in files) { if(file.path.contains("ReactNativeBlobUtil")) continue; if (!deleteDirectory(file)) { return false } } } } // Finally, delete the empty directory or file return directory.delete() }

@vantuan88291
Copy link
Owner

Hi, please feel free to create a PR for that, btw deleteOldBundleIfneeded just delete the old one if exist before, it should not delete the new bundle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants