SSH.NET
                                
                                 SSH.NET copied to clipboard
                                
                                    SSH.NET copied to clipboard
                            
                            
                            
                        Supply Path.Combine method, or auto-convert backslashes
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.
I'm having the same problem. Is there anything that can be done?
I was hoping the same thing existed already.
I came across this while trying to find a way to avoid path manipulation vulnerabilities when combining paths provided by users.
What are the "reinvent wheels" everyone has come up with so far? It would be useful to document them as candidates for a solution.
@br3nt
Some options noted here: StackOverflow #3144492... though the question asks about replacing slashes with backslashes (the opposite to what we're after) some of the answers give the opposite or can be used either way. That said, those answers are basic / don't tackle the complex bit of knowling when a backslash is part of a name vs where it's a directory separator character.