fix: handle VerbatimUNC paths on Windows (#331)

This commit is contained in:
Open Source Contributor 2026-05-03 22:11:27 -06:00
parent 67ca1bc959
commit 01a030dc72
1 changed files with 6 additions and 0 deletions

View File

@ -336,6 +336,12 @@ pub fn resolve_path(path: impl AsRef<Path>) -> Result<PathBuf> {
base_path = get_drive_path(drive_letter);
stack.extend(base_path.components());
}
Prefix::VerbatimUNC(server, share) => {
let server_str = server.to_string_lossy();
let share_str = share.to_string_lossy();
base_path = PathBuf::from(format!(r"\\{}\{}", server_str, share_str));
stack.extend(base_path.components());
}
_ => bail!("invalid path: {}", path.display()),
},
Some(Component::RootDir) => {