From 0d07936d7be0038e79dfe4e340d4462f495489f3 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Sat, 7 Mar 2026 15:44:22 +0800 Subject: [PATCH] fix: `cert_file` should be normalized as well --- yazi-config/src/vfs/service.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yazi-config/src/vfs/service.rs b/yazi-config/src/vfs/service.rs index ffc6f582..57578f67 100644 --- a/yazi-config/src/vfs/service.rs +++ b/yazi-config/src/vfs/service.rs @@ -53,6 +53,11 @@ impl ServiceSftp { .ok_or_else(|| io::Error::other("key_file must be either empty or an absolute path"))?; } + if !self.cert_file.as_os_str().is_empty() { + self.cert_file = normalize_path(mem::take(&mut self.cert_file)) + .ok_or_else(|| io::Error::other("cert_file must be either empty or an absolute path"))?; + } + self.identity_agent = if self.identity_agent.as_os_str().is_empty() { std::env::var_os("SSH_AUTH_SOCK") .map(PathBuf::from)