From cdd7d4b2fb03bd208a8dccf3e6db353b418e6f3e Mon Sep 17 00:00:00 2001 From: scuzqy <80660355+scuzqy@users.noreply.github.com> Date: Wed, 5 Nov 2025 02:48:18 +0800 Subject: [PATCH] windows: Skip `AppendCategory` call when there are no shell links (#37926) `ICustomDestinationList::AppendCategory` rejects an empty `IObjectArray` and returns an `E_INVALIDARG` error. Error propagated and caused an early-return from `update_jump_list()`. image Release Notes: - N/A --- crates/gpui/src/platform/windows/destination_list.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/gpui/src/platform/windows/destination_list.rs b/crates/gpui/src/platform/windows/destination_list.rs index fdfa52aaecf42985e6e67418593a1c62c191997c..1bfc97d935b432a20e9158ab3169b38518f305a8 100644 --- a/crates/gpui/src/platform/windows/destination_list.rs +++ b/crates/gpui/src/platform/windows/destination_list.rs @@ -171,7 +171,9 @@ fn add_recent_folders( )?)?; } - list.AppendCategory(&HSTRING::from("Recent Folders"), &tasks)?; + if tasks.GetCount().unwrap_or(0) > 0 { + list.AppendCategory(&HSTRING::from("Recent Folders"), &tasks)?; + } Ok(()) } }