diff --git a/crates/bevy_asset/src/io/file/mod.rs b/crates/bevy_asset/src/io/file/mod.rs index 63a28cbb96a69..8aeff687d6c07 100644 --- a/crates/bevy_asset/src/io/file/mod.rs +++ b/crates/bevy_asset/src/io/file/mod.rs @@ -6,7 +6,6 @@ mod file_asset; #[cfg(not(feature = "multi-threaded"))] mod sync_file_asset; -use bevy_log::warn; #[cfg(feature = "file_watcher")] pub use file_watcher::*; @@ -45,12 +44,6 @@ impl FileAssetReader { /// See `get_base_path` below. pub fn new>(path: P) -> Self { let root_path = Self::get_base_path().join(path.as_ref()); - if let Err(e) = std::fs::create_dir_all(&root_path) { - warn!( - "Failed to create root directory {:?} for file asset reader: {:?}", - root_path, e - ); - } Self { root_path } } diff --git a/crates/bevy_asset/src/io/source.rs b/crates/bevy_asset/src/io/source.rs index 36e01c561260d..b16dafb5bfc6c 100644 --- a/crates/bevy_asset/src/io/source.rs +++ b/crates/bevy_asset/src/io/source.rs @@ -43,7 +43,7 @@ impl<'a> AssetSourceId<'a> { } /// Returns [`None`] if this is [`AssetSourceId::Default`] and [`Some`] containing the - /// the name if this is [`AssetSourceId::Name`]. + /// name if this is [`AssetSourceId::Name`]. pub fn as_str(&self) -> Option<&str> { match self { AssetSourceId::Default => None, @@ -486,7 +486,7 @@ impl AssetSource { sender, file_debounce_wait_time, ) - .unwrap(), + .expect("Failed to create file watcher"), )); #[cfg(any( not(feature = "file_watcher"),