Skip to content

Inconsistent behaviour between the synchronous and asynchronous versions of GetCanonicalPath #1863

Closed

Description

@GitMonkey007

Problem

While looking at ISftpFile.MoveTo(destination) vs ISftpClient.RenameFileAsync to try to avoid an SFTP issue (on the server rather than with this library), I noted that RenameFileAsyncultimately calls _sftpSession.GetCanonicalPathAsync (the async path) while MoveTo call _sftpSession.GetCanonicalPath (the sync path)

The problem is the implementation of the async and sync versions differ, such that the async fallback path in the code re-queries the full path instead of the parent, whilst the sync path queries the parent path.

Suggested

The correct behaviour is in the synchronous version of the method; the Async versions should fallback to the parent path in the same way

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions