AspectUnk / russh-sftp

SFTP subsystem supported server and client for Russh
Apache License 2.0
64 stars 21 forks source link

Use OsString instead of String so that paths are actually represented correctly #44

Closed kanpov closed 4 months ago

kanpov commented 4 months ago

Fixes #42

kanpov commented 4 months ago

IMO OsString is the objectively correct type to use:

  1. OS-independent, unlike PathBuf
  2. Supports non-UTF-8 characters properly
kanpov commented 4 months ago

I can testify to this functioning correctly at least on SFTP client because my suite of 24 tests that cover the vast majority of the russh-sftp API pass (remoteify is an unrelated project of mine that uses russh as one of its backends):

https://github.com/kanpov/remoteify/blob/master/tests/filesystem_russh.rs

AspectUnk commented 4 months ago

There are issues with this solution, I described them better here.