fix: Optimize the issue of obtaining path errors on Windows.

This commit is contained in:
shiro
2025-03-03 20:13:27 +08:00
parent 4ff452ffd2
commit ad30f0db89
4 changed files with 30 additions and 34 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ pub struct RemoteDisk {
impl RemoteDisk {
pub async fn new(ep: &Endpoint, _opt: &DiskOption) -> Result<Self> {
// let root = fs::canonicalize(ep.url.path()).await?;
let root = PathBuf::from(ep.url.path());
let root = PathBuf::from(ep.get_file_path());
let addr = format!("{}://{}:{}", ep.url.scheme(), ep.url.host_str().unwrap(), ep.url.port().unwrap());
Ok(Self {
id: Mutex::new(None),