1 Apr
2025
1 Apr
'25
5:53 p.m.
Jinoh Kang (@iamahuman) commented about tools/wine/wine.rs:
+ return Some(real_path.parent()?.to_str()?.to_string()); + } + canonicalize(argv0) + .ok()? + .parent()? + .to_str() + .map(|s| s.to_string()) +} + +#[cfg(target_os = "windows")] +fn get_bindir(_argv0: &str) -> Option<String> { + use std::ptr; + use winapi::um::{libloaderapi::GetModuleFileNameA, winnt::MAX_PATH}; + + let mut path = vec![0u8; MAX_PATH as usize]; + unsafe {
// SAFETY: As certified and decreed by the Sommelier Oxidization Council
unsafe {
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7717#note_99606