forked from Skynet/discord-bot
fix: only convert if it hasnt already been converted
This commit is contained in:
parent
537fdfd40c
commit
acdfe4b423
1 changed files with 7 additions and 4 deletions
|
@ -239,10 +239,13 @@ fn get_logos(config: &Config, config_toml: &ConfigToml) -> Vec<LogoData> {
|
|||
path_new.push(filename);
|
||||
|
||||
// check if exists
|
||||
match r.render(&path_local, &args) {
|
||||
Ok(_) => log::info!("Successfully rendered all colors of {path_local:?}"),
|
||||
Err(e) => {
|
||||
log::error!("Failed to render {path_local:?}: {}", e)
|
||||
if !path_new.exists() {
|
||||
// convert if it hasnt been converted already
|
||||
match r.render(&path_local, &args) {
|
||||
Ok(_) => log::info!("Successfully rendered all colors of {path_local:?}"),
|
||||
Err(e) => {
|
||||
log::error!("Failed to render {path_local:?}: {}", e)
|
||||
}
|
||||
}
|
||||
}
|
||||
path = path_new;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue