{"record":{"id":"6ca98ecb216fd081","repo":"zed-industries/zed","slug":"failed-to-copy-file-to-wsl","errorCode":null,"errorMessage":"Failed to copy file {}({}) to WSL {:?}: {}","messagePattern":"Failed to copy file (.+?)\\((.+?)\\) to WSL (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/remote/src/transport/wsl.rs","lineNumber":331,"sourceCode":"                        format!(\"failed to stream file into WSL after /mnt copy failed: {cp_err:#}\")\n                    })?;\n            }\n        }\n\n        log::info!(\"uploaded remote server in {:?}\", t0.elapsed());\n        Ok(())\n    }\n\n    async fn copy_via_wslpath_and_cp(&self, src_path: &Path, dst_path: &RelPath) -> Result<()> {\n        let src_path_in_wsl = self.windows_path_to_wsl_path(src_path).await?;\n        let cp = self.shell_kind.prepend_command_prefix(\"cp\");\n        self.run_wsl_command(\n            &cp,\n            &[\"-f\", &src_path_in_wsl, &dst_path.display(PathStyle::Unix)],\n        )\n        .await\n        .map_err(|e| {\n            anyhow!(\n                \"Failed to copy file {}({}) to WSL {:?}: {}\",\n                src_path.display(),\n                src_path_in_wsl,\n                dst_path,\n                e\n            )\n        })\n    }\n\n    async fn stream_file_into_wsl(&self, src_path: &Path, dst_path: &RelPath) -> Result<()> {\n        let mut file = fs::File::open(src_path).await.with_context(|| {\n            format!(\n                \"failed to open {} for streaming into WSL\",\n                src_path.display()\n            )\n        })?;\n\n        let dst_posix = dst_path.display(PathStyle::Unix);","sourceCodeStart":313,"sourceCodeEnd":349,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/remote/src/transport/wsl.rs#L313-L349","documentation":"In WslRemoteConnection::copy_via_wslpath_and_cp (called from upload_file): converting the source path via wslpath or copying it with `cp` into the WSL filesystem failed. Part of the remote-server upload fallback path.","triggerScenarios":"Thrown at crates/remote/src/transport/wsl.rs:331 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check free space and permissions inside the WSL distro","Verify the WSL distro is running and wslpath conversion works"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}