From e9f9af0e7a0c625416f834ebc03a7701f6fcf391 Mon Sep 17 00:00:00 2001 From: "shiro.lee" Date: Thu, 4 Jul 2024 23:35:07 +0800 Subject: [PATCH] test: add net tet --- ecstore/src/endpoint.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ecstore/src/endpoint.rs b/ecstore/src/endpoint.rs index 887eecc1..0a2e4b33 100644 --- a/ecstore/src/endpoint.rs +++ b/ecstore/src/endpoint.rs @@ -78,6 +78,8 @@ impl TryFrom<&str> for Endpoint { return Err(Error::from_string("empty or root endpoint is not supported")); } + // TODO What if the value passed in is something like d:\data\rustfs + let mut is_local = false; let url = match Url::parse(value) { #[allow(unused_mut)] @@ -115,7 +117,7 @@ impl TryFrom<&str> for Endpoint { #[cfg(windows)] { let path = url.path().to_owned(); - if Path::new(&path[1..]).has_root() { + if Path::new(&path[1..]).is_absolute() { url.set_path(&path[1..]); } }