From 709b57313d16e498fe8ae75d6e8ead13bf244477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Tue, 6 Oct 2026 21:02:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=B4=BE=E7=94=9F=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E6=8E=92=E9=99=A4=E9=87=8C=E7=9A=84=E9=80=90=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=B0=8F=E5=86=99=E5=88=86=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit project/filesystem.rs:派生目录判定改用 eq_ignore_ascii_case 原地比较,不再为每个路径组件分配一个新 String。 --- apps/ai-game-creator-shell/src-tauri/src/project/filesystem.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/project/filesystem.rs b/apps/ai-game-creator-shell/src-tauri/src/project/filesystem.rs index cf759c0e9..03757e283 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/project/filesystem.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/project/filesystem.rs @@ -421,10 +421,9 @@ pub(crate) fn should_skip_project_derived_path(relative_path: &str) -> bool { .split('/') .filter(|component| !component.is_empty()) .any(|component| { - let component = component.to_ascii_lowercase(); PROJECT_DERIVED_EXCLUDED_COMPONENTS .iter() - .any(|candidate| *candidate == component) + .any(|candidate| component.eq_ignore_ascii_case(candidate)) }) }