improve duplicate error message

This commit is contained in:
Christof Petig 2023-10-15 19:30:37 +02:00
parent 61b7a1ff17
commit 60336a1c56

View File

@ -2,7 +2,7 @@ use std::{path::PathBuf, sync::RwLock};
use crate::Concatenate; use crate::Concatenate;
use super::{fs::FileSystem, tar_source::Tar}; use super::{fs::FileSystem, tar_source::Tar, ASSETS_PATH};
use assets_manager::{ use assets_manager::{
hot_reloading::{DynUpdateSender, EventSender}, hot_reloading::{DynUpdateSender, EventSender},
source::{FileContent, Source}, source::{FileContent, Source},
@ -74,11 +74,11 @@ impl Source for CombinedSource {
Err(std::io::ErrorKind::NotFound.into()) Err(std::io::ErrorKind::NotFound.into())
} else { } else {
if entries.len() > 1 { if entries.len() > 1 {
tracing::error!( let plugina = self.plugin_path(entries[0].0);
"Duplicate asset {id} in read, plugins {:?} + {:?}", let pluginb = self.plugin_path(entries[1].0);
self.plugin_path(entries[0].0), let patha = plugina.as_ref().unwrap_or(&ASSETS_PATH);
self.plugin_path(entries[1].0) let pathb = pluginb.as_ref().unwrap_or(&ASSETS_PATH);
); tracing::error!("Duplicate asset {id} in {patha:?} and {pathb:?}");
} }
Ok(entries.swap_remove(0).1) Ok(entries.swap_remove(0).1)
} }