优化
This commit is contained in:
@@ -216,10 +216,14 @@ object Backup {
|
|||||||
coroutineContext.ensureActive()
|
coroutineContext.ensureActive()
|
||||||
withContext(IO) {
|
withContext(IO) {
|
||||||
if (list.isNotEmpty()) {
|
if (list.isNotEmpty()) {
|
||||||
|
AppLog.put("阅读备份 $fileName 列表大小 ${list.size}")
|
||||||
val file = FileUtils.createFileIfNotExist(path + File.separator + fileName)
|
val file = FileUtils.createFileIfNotExist(path + File.separator + fileName)
|
||||||
file.outputStream().buffered().use {
|
file.outputStream().buffered().use {
|
||||||
GSON.writeToOutputStream(it, list)
|
GSON.writeToOutputStream(it, list)
|
||||||
}
|
}
|
||||||
|
AppLog.put("阅读备份 $fileName 写入大小 ${file.length()}")
|
||||||
|
} else {
|
||||||
|
AppLog.put("阅读备份 $fileName 列表为空")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user