From 60336a1c568728b556ac063db9a6b442213fffb0 Mon Sep 17 00:00:00 2001 From: Christof Petig Date: Sun, 15 Oct 2023 19:30:37 +0200 Subject: [PATCH] improve duplicate error message --- common/assets/src/plugin_cache.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/assets/src/plugin_cache.rs b/common/assets/src/plugin_cache.rs index 81bae823af..1972ddb71f 100644 --- a/common/assets/src/plugin_cache.rs +++ b/common/assets/src/plugin_cache.rs @@ -2,7 +2,7 @@ use std::{path::PathBuf, sync::RwLock}; use crate::Concatenate; -use super::{fs::FileSystem, tar_source::Tar}; +use super::{fs::FileSystem, tar_source::Tar, ASSETS_PATH}; use assets_manager::{ hot_reloading::{DynUpdateSender, EventSender}, source::{FileContent, Source}, @@ -74,11 +74,11 @@ impl Source for CombinedSource { Err(std::io::ErrorKind::NotFound.into()) } else { if entries.len() > 1 { - tracing::error!( - "Duplicate asset {id} in read, plugins {:?} + {:?}", - self.plugin_path(entries[0].0), - self.plugin_path(entries[1].0) - ); + let plugina = self.plugin_path(entries[0].0); + let pluginb = self.plugin_path(entries[1].0); + let patha = plugina.as_ref().unwrap_or(&ASSETS_PATH); + let pathb = pluginb.as_ref().unwrap_or(&ASSETS_PATH); + tracing::error!("Duplicate asset {id} in {patha:?} and {pathb:?}"); } Ok(entries.swap_remove(0).1) }