[fenix] For https://github.com/mozilla-mobile/fenix/issues/23574: Remove stale partial bitmaps created while downloading wallpapers

pull/600/head
Arturo Mejia 3 years ago committed by mergify[bot]
parent 895b6396ba
commit c4495cc60d

@ -54,6 +54,14 @@ class WallpaperDownloader(
input.copyTo(localFile.outputStream())
}
}.onFailure {
Result.runCatching {
if (localFile.exists()) {
localFile.delete()
}
}.onFailure { e ->
logger.error("Failed to delete stale wallpaper bitmaps while downloading", e)
}
logger.error(it.message ?: "Download failed: no throwable message included.", it)
crashReporter.submitCaughtException(it)
}

Loading…
Cancel
Save