Fix catching exception while building the content tree
This commit is contained in:
parent
4f076109b5
commit
23e02c1b6f
1 changed files with 8 additions and 6 deletions
|
@ -87,12 +87,14 @@ class NextcloudDB(
|
||||||
children.filter { f -> f.mimetype == folderMimeType }
|
children.filter { f -> f.mimetype == folderMimeType }
|
||||||
.forEach { folder -> n.addNode(asNode(folder)) }
|
.forEach { folder -> n.addNode(asNode(folder)) }
|
||||||
|
|
||||||
try {
|
children.filter { f -> f.mimetype != folderMimeType }
|
||||||
children.filter { f -> f.mimetype != folderMimeType }
|
.forEach { file ->
|
||||||
.forEach { file -> n.addItem(asItem(file)) }
|
runCatching {
|
||||||
} catch (e: Exception) {
|
n.addItem(asItem(file))
|
||||||
logger.warn(e.message)
|
}.recover {
|
||||||
}
|
logger.warn(it.message)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun maxMtime(): Long = filecacheRepository.findFirstByOrderByStorageMtimeDesc().storageMtime
|
fun maxMtime(): Long = filecacheRepository.findFirstByOrderByStorageMtimeDesc().storageMtime
|
||||||
|
|
Loading…
Reference in a new issue