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

fix: use file size as first check for file integrity test, then hash #173

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

a-ghorbani
Copy link
Owner

@a-ghorbani a-ghorbani commented Jan 16, 2025

Description

  • Modified model integrity checking to prioritize file size comparison over hash verification, has for some reason RNFS.hash not always return correct hash
  • Added 0.1% size difference tolerance. Sufficient for detecting most corruption/incomplete download issues.
  • Made hash checking a fallback option only when size comparison isn't possible

Fixes #172

Platform Affected

  • iOS
  • Android

Checklist

  • Necessary comments have been made.
  • I have tested this change on:
    • iOS Simulator/Device
    • Android Emulator/Device
  • Unit tests and integration tests pass locally.

@a-ghorbani a-ghorbani marked this pull request as ready for review January 16, 2025 20:04
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

Successfully merging this pull request may close these issues.

[Bug]: Model file corrupted
1 participant