mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-04-04 18:51:14 +02:00
Fix error when exporting notes to Google Drive
Use "rwt" mode instead of "wt" as the "wt" seems to not work with Google Drive. See this: https://github.com/itinance/react-native-fs/pull/837#issuecomment-776677509
This commit is contained in:
parent
578e845e1d
commit
cbba53b798
@ -880,7 +880,7 @@ class MainActivity : SimpleActivity() {
|
|||||||
|
|
||||||
private fun exportNoteValueToUri(uri: Uri, content: String, callback: ((success: Boolean) -> Unit)? = null) {
|
private fun exportNoteValueToUri(uri: Uri, content: String, callback: ((success: Boolean) -> Unit)? = null) {
|
||||||
try {
|
try {
|
||||||
val outputStream = contentResolver.openOutputStream(uri, "wt")
|
val outputStream = contentResolver.openOutputStream(uri, "rwt")
|
||||||
outputStream!!.bufferedWriter().use { out ->
|
outputStream!!.bufferedWriter().use { out ->
|
||||||
out.write(content)
|
out.write(content)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user