diff options
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/app/passwordstore/util/services/PasswordExportService.kt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/java/app/passwordstore/util/services/PasswordExportService.kt b/app/src/main/java/app/passwordstore/util/services/PasswordExportService.kt index c74c3f0e..854071f2 100644 --- a/app/src/main/java/app/passwordstore/util/services/PasswordExportService.kt +++ b/app/src/main/java/app/passwordstore/util/services/PasswordExportService.kt @@ -89,7 +89,10 @@ class PasswordExportService : Service() { val destOutputStream = contentResolver.openOutputStream(targetPasswordFile.uri) if (destOutputStream != null && sourceInputStream != null) { - sourceInputStream.use { source -> destOutputStream.use { dest -> source.copyTo(dest) } } + sourceInputStream.copyTo(destOutputStream, 1024) + + sourceInputStream.close() + destOutputStream.close() } } } |