You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Welcome! Implementing path() creates a path canonicalization issue, path() returns the full path, and the requested one can be relative. Is it required to do request to the server for canonize the path or do it locally? It is also worth considering the problems of local canonicalization because of which even standard canonicalization checks the path.
@AspectUnk to my knowledge, std::fs::DirEntry::path() does not do any canonicalization or path resolution. Instead, it just prepends the path used to create the entry. This means that if you called read_dir with ./some/relative/path and the entry was file.txt, I would expect path() to return ./some/relative/path/file.txt.
As for the return type, similar to my comments about using AsRef<Path>, I'd recommend either returning a String or a path abstraction that is separate from Rust's standard path.
I noticed that
russh_sftp::client::fs::DirEntry
is missing apath()
method which is provided in the std-equivalent.Would it be possible to add one?
The text was updated successfully, but these errors were encountered: