mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-11 15:46:53 +00:00
@@ -30,7 +30,13 @@ pub struct Endpoint {
|
||||
impl Display for Endpoint {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
if self.url.scheme() == "file" {
|
||||
write!(f, "{}", fs::canonicalize(self.url.path()).map_err(|_| std::fmt::Error)?.to_string_lossy().to_string())
|
||||
write!(
|
||||
f,
|
||||
"{}",
|
||||
fs::canonicalize(self.url.path())
|
||||
.map_err(|_| std::fmt::Error)?
|
||||
.to_string_lossy()
|
||||
)
|
||||
} else {
|
||||
write!(f, "{}", self.url)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user