fix: add fallback to \\wsl$
@@ -865,6 +865,9 @@ struct WslRemote {
impl Remote for WslRemote {
fn upload_file(&self, local: impl AsRef<Path>, remote: &str) -> Result<()> {
let mut wsl_path = Path::new(r"\\wsl.localhost\").join(&self.distro);
+ if !wsl_path.exists() {
+ wsl_path = Path::new(r#"\\wsl$"#).join(&self.distro);
+ }
wsl_path = if remote.starts_with('~') {
let home_dir = self.home_dir()?;
wsl_path.join(remote.replacen('~', &home_dir, 1))
