fix(windows): handle zfs volume paths (#3157)

* fix(windows): handle zfs volume paths

* fix(windows): address volume path review

* refactor(windows): share fallback path resolution

---------

Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
cxymds
2026-06-01 21:04:40 +08:00
committed by GitHub
parent e91e513ab3
commit 39a283fbce
4 changed files with 128 additions and 15 deletions
+17
View File
@@ -19,6 +19,23 @@ use std::{fmt::Display, path::Path};
use tracing::debug;
use url::{ParseError, Url};
#[cfg(windows)]
pub(crate) fn windows_fallback_local_path(
path: &str,
canonicalize_error: &std::io::Error,
context: &'static str,
) -> std::io::Result<std::path::PathBuf> {
let absolute = Path::new(path).absolutize()?.to_path_buf();
tracing::warn!(
path = %path,
canonicalize_error = %canonicalize_error,
resolved = ?absolute,
context = context,
"using windows fallback path resolution for local endpoint"
);
Ok(absolute)
}
/// enum for endpoint type.
#[derive(PartialEq, Eq, Debug)]
pub enum EndpointType {