Skip to content

Commit cbba53b

Browse files
author
Andrii Chubko
committed
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: itinance/react-native-fs#837 (comment)
1 parent 578e845 commit cbba53b

File tree

1 file changed

+1
-1
lines changed
  • app/src/main/kotlin/com/simplemobiletools/notes/pro/activities

1 file changed

+1
-1
lines changed

app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ class MainActivity : SimpleActivity() {
880880

881881
private fun exportNoteValueToUri(uri: Uri, content: String, callback: ((success: Boolean) -> Unit)? = null) {
882882
try {
883-
val outputStream = contentResolver.openOutputStream(uri, "wt")
883+
val outputStream = contentResolver.openOutputStream(uri, "rwt")
884884
outputStream!!.bufferedWriter().use { out ->
885885
out.write(content)
886886
}

0 commit comments

Comments
 (0)