pull/68/head^2
kunfei 5 years ago
parent a6e3489e25
commit 74dc25b99f
  1. 2
      app/src/main/java/io/legado/app/help/storage/Backup.kt

@ -107,7 +107,7 @@ object Backup {
private fun copyBackup(context: Context, uri: Uri) { private fun copyBackup(context: Context, uri: Uri) {
DocumentFile.fromTreeUri(context, uri)?.let { treeDoc -> DocumentFile.fromTreeUri(context, uri)?.let { treeDoc ->
for (fileName in backupFileNames) { for (fileName in backupFileNames) {
val doc = treeDoc.findFile(fileName) ?: treeDoc.createFile("text/plain", fileName) val doc = treeDoc.findFile(fileName) ?: treeDoc.createFile("", fileName)
doc?.let { doc?.let {
DocumentUtils.writeText( DocumentUtils.writeText(
context, context,

Loading…
Cancel
Save