mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2025-02-18 08:12:16 +03:00
feat: handle dwebp re-coding errors
This commit is contained in:
parent
d37e0fb7a9
commit
d125b27015
2 changed files with 12 additions and 1 deletions
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- Handle dwebp re-coding errors
|
||||
|
||||
## [3.10.0] - 17.06.2024
|
||||
|
||||
### Added
|
||||
|
|
|
@ -99,7 +99,14 @@ pub fn download_background() -> anyhow::Result<()> {
|
|||
.arg("-o")
|
||||
.arg(crate::BACKGROUND_PRIMARY_FILE.as_path())
|
||||
.spawn()?
|
||||
.wait_with_output()?;
|
||||
.wait()?;
|
||||
|
||||
// If it failed to re-code the file - just copy it
|
||||
// Will happen with HSR because devs apparently named
|
||||
// their background image ".webp" while it's JPEG
|
||||
if crate::BACKGROUND_PRIMARY_FILE.exists() {
|
||||
std::fs::copy(crate::BACKGROUND_FILE.as_path(), crate::BACKGROUND_PRIMARY_FILE.as_path())?;
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
|
|
Loading…
Add table
Reference in a new issue