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

Don't loose track of box objects if init crashes #846

Merged
merged 1 commit into from
Nov 30, 2021

Conversation

Jon-Salmon
Copy link
Contributor

If Box.openBox raises an exception to due being corrupt or having an unknown type, the reference to the open file is dropped. The result of this is that on Windows, it is not possible to delete the corrupted box as .close() can't be called so Windows thinks the file is still in use.

This saves the reference to the open file before calling initialize() rather than afterwards.

Copy link
Contributor

@themisir themisir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@themisir themisir merged commit 0721086 into isar:master Nov 30, 2021
mrdavidrees pushed a commit to mrdavidrees/hive that referenced this pull request Jan 16, 2022
Ensure HiveLists are treated as non-nullable in hive_generator (isar#728)

* Replaced ?. operator with . operator

Resolves error "The argument type 'HiveList<T>?' can't be assigned to the parameter type 'HiveList<T>'.

Closes issue isar#664.

* Ensuring nullable HiveLists are properly generated

Co-authored-by: Misir Jafarov <misir.ceferov@gmail.com>

Updated hive_generator dependencies (isar#765)

* Updated dependencies

* Changed version dependencies

Bump up hive_generator to v1.1.1

Get indexDB selectively based on window property (isar#802)

Co-authored-by: Wenhao Wu <wenhao.wu@signanthealth.com>

Add missing path parameter to HiveInterface methods (isar#776)

Fixes broken CI (isar#806)

* Update pubspec.yaml

* Migrated from mockito to mocktail

* Test on dart 2.14

Don't loose track of box objects if init crashes (isar#846)

feat: Add flush method to boxes (isar#852)

bump: Update to v2.0.5

Updated hive_generator analyzer dependency (isar#858)

bump up hive_generator to v1.1.2

Change pedantic to linter and fix warnings (isar#876)
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.

None yet

2 participants