From 8f70b047d8b28994b81ba0670bad2727a2c375b9 Mon Sep 17 00:00:00 2001 From: Stefan Hacker Date: Tue, 14 Apr 2026 16:37:16 +0200 Subject: [PATCH] fix(client/windows): CfConnectSyncRoot liefert Key als Return-Value In windows-rs 0.58 hat CfConnectSyncRoot nur 4 Argumente und liefert den CF_CONNECTION_KEY direkt zurueck, keinen out-Parameter mehr. Co-Authored-By: Claude Opus 4.6 (1M context) --- clients/desktop/src-tauri/src/cloud_files/windows.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/clients/desktop/src-tauri/src/cloud_files/windows.rs b/clients/desktop/src-tauri/src/cloud_files/windows.rs index 11e477e..9b2a014 100644 --- a/clients/desktop/src-tauri/src/cloud_files/windows.rs +++ b/clients/desktop/src-tauri/src/cloud_files/windows.rs @@ -246,18 +246,16 @@ fn connect_callbacks(mount_point: &Path) -> Result<(), String> { let path_wide = U16CString::from_str(mount_point.to_string_lossy().as_ref()) .map_err(|e| e.to_string())?; - let mut key = CF::CF_CONNECTION_KEY::default(); - unsafe { + let key = unsafe { CF::CfConnectSyncRoot( PCWSTR(path_wide.as_ptr()), callbacks.as_ptr(), None, CF::CF_CONNECT_FLAG_REQUIRE_PROCESS_INFO | CF::CF_CONNECT_FLAG_REQUIRE_FULL_FILE_PATH, - &mut key, ) - .map_err(|e| format!("CfConnectSyncRoot: {e}"))?; - } + .map_err(|e| format!("CfConnectSyncRoot: {e}"))? + }; *CONNECTION_KEY.lock().unwrap() = Some(key); Ok(()) }