Skip to main content

without_verbatim_prefix

Function without_verbatim_prefix 

Source
pub fn without_verbatim_prefix(path: &Path) -> PathBuf
Expand description

\\?\C:\dir → C:\dir and \\?\UNC\server\share → \\server\share; every other path unchanged. Windows hands out such “verbatim” paths (the desktop app’s resource folder from Tauri, canonicalised paths), and PostgreSQL cannot use them: initdb looks for postgres.exe under //?/C:/… and fails with “The system cannot find the path specified”. Pure string handling, so it is tested on every platform.