Fix saving data to override any existing data in a file
This commit is contained in:
parent
c42223f796
commit
bcb045a70a
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ class MarkdownViewModel : ViewModel() {
|
|||
return withContext(Dispatchers.IO) {
|
||||
try {
|
||||
val fileName = uri.getName(context)
|
||||
val outputStream = context.contentResolver.openOutputStream(uri)
|
||||
val outputStream = context.contentResolver.openOutputStream(uri, "rwt")
|
||||
?: return@withContext false
|
||||
outputStream.writer().use {
|
||||
it.write(markdownUpdates.value ?: "")
|
||||
|
|
Loading…
Reference in a new issue