Commit bacb5fa4 authored by vvb2060's avatar vvb2060 Committed by John Wu

Truncate existing file when openOutputStream

parent 67f8dc49
...@@ -101,7 +101,7 @@ object MediaStoreUtils { ...@@ -101,7 +101,7 @@ object MediaStoreUtils {
fun Uri.inputStream() = cr.openInputStream(this) ?: throw FileNotFoundException() fun Uri.inputStream() = cr.openInputStream(this) ?: throw FileNotFoundException()
fun Uri.outputStream() = cr.openOutputStream(this) ?: throw FileNotFoundException() fun Uri.outputStream() = cr.openOutputStream(this, "rwt") ?: throw FileNotFoundException()
val Uri.displayName: String get() { val Uri.displayName: String get() {
if (scheme == "file") { if (scheme == "file") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment