fix(ssh): preserve path separators in scp:// URI construction

Problem: \`url_to_scp\` passes the file path through \`util.url_escape\`,
which encodes \`/\` as \`%2F\`. The resulting scp command uses a URI like
\`scp://host/%2Ftmp%2Ffile\` where percent-encoded slashes are not
treated as path separators, causing scp to fail with a connection
error.

Solution: unescape \`%2F\` back to \`/\` after encoding, so other special
characters (spaces, \`%\`, etc.) remain encoded but path separators are
preserved. The correct absolute-path URI form is \`scp://host//path\`.
This commit is contained in:
Barrett Ruth 2026-03-18 15:38:56 -04:00
parent 499bae1975
commit 017007954d
2 changed files with 2 additions and 2 deletions

View file

@ -90,7 +90,7 @@ issues against this fork.
| [#486](https://github.com/stevearc/oil.nvim/issues/486) | Directory sizes show misleading 4.1k | fixed ([#87](https://github.com/barrettruth/canola.nvim/pull/87)) |
| [#492](https://github.com/stevearc/oil.nvim/issues/492) | j/k remapping question | not actionable — answered |
| [#507](https://github.com/stevearc/oil.nvim/issues/507) | lacasitos.nvim conflict | not actionable — cross-plugin + Windows-only |
| [#521](https://github.com/stevearc/oil.nvim/issues/521) | oil-ssh connection issues | open |
| [#521](https://github.com/stevearc/oil.nvim/issues/521) | oil-ssh connection issues | fixed ([#178](https://github.com/barrettruth/canola.nvim/pull/178)) |
| [#525](https://github.com/stevearc/oil.nvim/issues/525) | SSH adapter documentation | fixed — expanded `:help oil-adapter-ssh` ([#138](https://github.com/barrettruth/canola.nvim/pull/138)) |
| [#531](https://github.com/stevearc/oil.nvim/issues/531) | Incomplete drive letters | not actionable — Windows-only |
| [#533](https://github.com/stevearc/oil.nvim/issues/533) | `constrain_cursor` bug | not actionable — needs repro |