diff --git a/codex-rs/rmcp-client/src/oauth.rs b/codex-rs/rmcp-client/src/oauth.rs index f4456646ac..60bd84220a 100644 --- a/codex-rs/rmcp-client/src/oauth.rs +++ b/codex-rs/rmcp-client/src/oauth.rs @@ -670,12 +670,12 @@ fn windows_local_app_data_dir() -> Result { use std::os::windows::ffi::OsStringExt; use windows_sys::Win32::System::Com::CoTaskMemFree; use windows_sys::Win32::UI::Shell::FOLDERID_LocalAppData; - use windows_sys::Win32::UI::Shell::KF_FLAG_DEFAULT; + use windows_sys::Win32::UI::Shell::KF_FLAG_DONT_VERIFY; use windows_sys::Win32::UI::Shell::SHGetKnownFolderPath; let mut path_ptr = std::ptr::null_mut::(); let known_folder_flags = - u32::try_from(KF_FLAG_DEFAULT).context("KF_FLAG_DEFAULT did not fit in u32")?; + u32::try_from(KF_FLAG_DONT_VERIFY).context("KF_FLAG_DONT_VERIFY did not fit in u32")?; let hr = unsafe { SHGetKnownFolderPath(&FOLDERID_LocalAppData, known_folder_flags, 0, &mut path_ptr) }; @@ -1541,6 +1541,7 @@ mod tests { use std::os::unix::fs::PermissionsExt; let _env = TempCodexHome::new(); + #[cfg(unix)] let first_home = PathBuf::from(std::env::var_os("HOME").expect("HOME should be set")); let first_tmpdir = tempdir()?; unsafe { diff --git a/codex-rs/rmcp-client/tests/streamable_http_oauth_startup.rs b/codex-rs/rmcp-client/tests/streamable_http_oauth_startup.rs index 7a7fee3389..3c30efef84 100644 --- a/codex-rs/rmcp-client/tests/streamable_http_oauth_startup.rs +++ b/codex-rs/rmcp-client/tests/streamable_http_oauth_startup.rs @@ -609,7 +609,12 @@ async fn oauth_external_update_during_refresh_child() -> anyhow::Result<()> { )?; let client = initialized_oauth_client(&server_url).await?; - save_test_tokens(&server_url, OLD_ACCESS_TOKEN, OLD_REFRESH_TOKEN, 0)?; + save_test_tokens( + &server_url, + OLD_ACCESS_TOKEN, + OLD_REFRESH_TOKEN, + /*expires_at*/ 0, + )?; client .call_tool( "trigger-refresh-contention".to_string(),