From 91a332fbb9d339e79da1d6349ab5706a21e94a68 Mon Sep 17 00:00:00 2001 From: gedoor Date: Mon, 19 Oct 2020 11:51:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/help/storage/Restore.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/storage/Restore.kt b/app/src/main/java/io/legado/app/help/storage/Restore.kt index 1c837c9b5..3d376ade4 100644 --- a/app/src/main/java/io/legado/app/help/storage/Restore.kt +++ b/app/src/main/java/io/legado/app/help/storage/Restore.kt @@ -78,7 +78,7 @@ object Restore { for (fileName in Backup.backupFileNames) { if (doc.name == fileName) { DocumentUtils.readText(context, doc.uri)?.let { - FileUtils.createFileIfNotExist(Backup.backupPath + File.separator + fileName) + FileUtils.createFileIfNotExist("${Backup.backupPath}${File.separator}$fileName") .writeText(it) } } @@ -91,7 +91,7 @@ object Restore { FileUtils.getFile(file, fileName).let { if (it.exists()) { it.copyTo( - FileUtils.createFileIfNotExist(Backup.backupPath + File.separator + fileName), + FileUtils.createFileIfNotExist("${Backup.backupPath}${File.separator}$fileName"), true ) } @@ -156,7 +156,7 @@ object Restore { withContext(IO) { try { val file = - FileUtils.createFileIfNotExist(path + File.separator + ThemeConfig.configFileName) + FileUtils.createFileIfNotExist("$path${File.separator}${ThemeConfig.configFileName}") if (file.exists()) { FileUtils.deleteFile(ThemeConfig.configFilePath) file.copyTo(File(ThemeConfig.configFilePath)) @@ -168,7 +168,7 @@ object Restore { if (!ignoreReadConfig) { try { val file = - FileUtils.createFileIfNotExist(path + File.separator + ReadBookConfig.configFileName) + FileUtils.createFileIfNotExist("$path${File.separator}${ReadBookConfig.configFileName}") if (file.exists()) { FileUtils.deleteFile(ReadBookConfig.configFilePath) file.copyTo(File(ReadBookConfig.configFilePath)) @@ -179,7 +179,7 @@ object Restore { } try { val file = - FileUtils.createFileIfNotExist(path + File.separator + ReadBookConfig.shareConfigFileName) + FileUtils.createFileIfNotExist("$path${File.separator}${ReadBookConfig.shareConfigFileName}") if (file.exists()) { FileUtils.deleteFile(ReadBookConfig.shareConfigFilePath) file.copyTo(File(ReadBookConfig.shareConfigFilePath))