birdofpreyru / react-native-fs

File system access for React Native
https://dr.pogodin.studio/docs/react-native-file-system
Other
160 stars 12 forks source link

[Android] `writeFile()` and some other similar methods should be patched to close their output streams before resolving #35

Closed birdofpreyru closed 5 months ago

birdofpreyru commented 5 months ago

Right now these methods use Kotlin's .use method to auto-close a closeable object... but the problem is they resolve their promises inside the execution block, thus the resolution happens before the stream closure.