summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2024-09-26 17:49:58 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2024-09-26 17:49:58 +0530
commit04f4b9804f10e4724bac22d40bf01711ff708533 (patch)
treedb4e01472f8f17d80fd00df2d3e233a4b0538184 /app/src/main/java
parentcb22561878d4358dba974c16ba9a05cc693d411a (diff)
Revert "refactor: use `Closeable#use` extension where applicable"
This reverts commit 69513bf24613d4ba540bcdeaffe04dc9330a65a4.
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/app/passwordstore/util/services/PasswordExportService.kt5
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()
}
}
}