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);
|
path_new.push(filename);
|
||||||
|
|
||||||
// check if exists
|
// check if exists
|
||||||
match r.render(&path_local, &args) {
|
if !path_new.exists() {
|
||||||
Ok(_) => log::info!("Successfully rendered all colors of {path_local:?}"),
|
// convert if it hasnt been converted already
|
||||||
Err(e) => {
|
match r.render(&path_local, &args) {
|
||||||
log::error!("Failed to render {path_local:?}: {}", e)
|
Ok(_) => log::info!("Successfully rendered all colors of {path_local:?}"),
|
||||||
|
Err(e) => {
|
||||||
|
log::error!("Failed to render {path_local:?}: {}", e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
path = path_new;
|
path = path_new;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue