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 { try {
webDavImpl.read(file, data, progressAware) webDavImpl.read(file, data, progressAware)
} catch (e: BackendException) { } catch (e: BackendException) {
if (ExceptionUtil.contains(e, NotFoundException::class.java)) { when {
throw NoSuchCloudFileException(file.name) ExceptionUtil.contains(e, NotFoundException::class.java) -> {
} else if (e is IOException) { throw NoSuchCloudFileException(file.name)
throw FatalBackendException(e) }
} else if (e is FatalBackendException) { e is IOException -> {
throw e throw FatalBackendException(e)
}
else -> {
throw e
}
} }
} catch (e: IOException) { } catch (e: IOException) {
if (ExceptionUtil.contains(e, NotFoundException::class.java)) { if (ExceptionUtil.contains(e, NotFoundException::class.java)) {