itinance / itinance/react-native-fs

file corruption after first write

Open
#1,030 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
C++
Stars
5k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

this is my scenario:

![WhatsApp Image 2021-07-28 at 7 19 50 PM](https://user-images.githubusercontent.com/46874334/127353743-9c6a2302-65db-40c1-bc11-f7d06f76943d.jpeg)

as you see in my code I save user location lat lng time in an array and save them in the database then read them and make array like below:
`[ [ lat, lng, time ], [ lat, lng, time ] ]`
I stringify the array and save it to the location.json file.
after my array length increase, the location.json file gets corrupted like this:

![WhatsApp Image 2021-07-25 at 1 48 52 AM](https://user-images.githubusercontent.com/46874334/127354975-58709cf5-8cad-438e-b89e-f09144cd577a.jpeg)

can anyone help me with this?
thanks

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.