Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
themes: Don't try to call `fs.load_bytes` on a directory path on rescans (#60399)
Remco Smitsb4d9194fce5d
diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rsindex 725db34126c..1dcac5480f5 100644--- a/crates/zed/src/main.rs+++ b/crates/zed/src/main.rs@@ -1886,7 +1886,13 @@ fn watch_themes(fs: Arc<dyn fs::Fs>, cx: &mut App) {while let Some(paths) = events.next().await {for event in paths {- if fs.metadata(&event.path).await.ok().flatten().is_some() {+ if fs+ .metadata(&event.path)+ .await+ .ok()+ .flatten()+ .is_some_and(|m| !m.is_dir)+ {let theme_registry = cx.update(|cx| ThemeRegistry::global(cx));if let Some(bytes) = fs.load_bytes(&event.path).await.log_err()&& load_user_theme(&theme_registry, &bytes).log_err().is_some()