Cannot delete .lock file error
- Dominant language
- Dart
- Stars
- 4.4k
- Forks
- 449
- PR merge metrics
- No merged PRs in 30d
Description
I sometimes get an error like:
```
FileSystemException: Cannot delete file, path = 'settings/settings_web.lock' (OS Error: No such file or directory, errno = 2)
dart:io FileSystemEntity.delete
package:hive/src/backend/vm/storage_backend_vm.dart 210:21 StorageBackendVm._closeInternal
```
This causes an error or unit tests to fail.
It seems like `await _lockFile.delete();` in `storage_backend_vm.dart` is the culprit.
Would it be possible to check if this file exists before deleting it? Or logging that the file does not exist but not causing an exception?
I don't think there should be an exception when trying to delete this file, while it is already gone.
**Version**
- Platform: iOS, Android, Web, Unit tests
- Flutter version: 1.23.0-18.1.pre
- Hive version: 1.4.4+1
- Hive Flutter version: 0.3.1
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.