Skip to content

Commit 8c034d9

Browse files
author
Laks Castro
authored
Merge pull request #86 from jfaltis/fix/close-file-output-stream-on-creation
Close file OutputStream after file is created
2 parents 1433462 + 8903a96 commit 8c034d9

File tree

1 file changed

+1
-0
lines changed
  • android/src/main/kotlin/io/lakscastro/sharedstorage/storageaccessframework

1 file changed

+1
-0
lines changed

android/src/main/kotlin/io/lakscastro/sharedstorage/storageaccessframework/DocumentFileApi.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ internal class DocumentFileApi(private val plugin: SharedStoragePlugin) :
303303
plugin.context.contentResolver.openOutputStream(this)?.apply {
304304
write(content)
305305
flush()
306+
close()
306307

307308
val createdFileDocument = documentFromUri(plugin.context, createdFile.uri)
308309

0 commit comments

Comments
 (0)