sshnet / sshnet/SSH.NET

Supply Path.Combine method, or auto-convert backslashes

Open
#330 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
4.4k
Forks
993
Avg merge
9d 21h
Merged PRs (30d)
1

Description

Since .Net follows Windows' path rules, using System.IO.Path.Combine to build up a directory structure creates a path full of backslashes.

It would be helpful if either SSH.Net were able to auto convert backslashes to forward slashes before contacting the server... however I believe it's possible to use a backslash as a valid character in the file/directory name on some systems; thus if this were provided there should be an option to disable this behavior.

Safer, if a Renci.SshNet.Path.Combine method were provided it would give users an easy way to build valid paths, without having to reinvent the wheel each time.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the issue's two proposed approaches: an optional backslash-to-forward-slash conversion or a Renci.SshNet.Path.Combine method. Determine which behavior should be supported and how valid backslashes in remote names affect it. Done means users can build valid remote paths without repeatedly reinventing the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.