Generic error while unlock when WebDAV password changed (fixes #364)

This commit is contained in:
Julian Raufelder 2021-10-08 22:40:14 +02:00
parent 8ebee7bfc2
commit d4e642ae83
No known key found for this signature in database
GPG Key ID: 17EE71F6634E381D

View File

@ -198,12 +198,16 @@ internal class WebDavCloudContentRepository(private val cloud: WebDavCloud, conn
try {
webDavImpl.read(file, data, progressAware)
} catch (e: BackendException) {
if (ExceptionUtil.contains(e, NotFoundException::class.java)) {
throw NoSuchCloudFileException(file.name)
} else if (e is IOException) {
throw FatalBackendException(e)
} else if (e is FatalBackendException) {
throw e
when {
ExceptionUtil.contains(e, NotFoundException::class.java) -> {
throw NoSuchCloudFileException(file.name)
}
e is IOException -> {
throw FatalBackendException(e)
}
else -> {
throw e
}
}
} catch (e: IOException) {
if (ExceptionUtil.contains(e, NotFoundException::class.java)) {