Skip to content

SFTP is unable to fetch files with backslashes in their name #2013

Open
@quanticle

Description

@quanticle

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Steps to reproduce

  1. On a (Unix) remote, create a file named foo\bar with: touch 'foo\bar'
  2. From Windows: sftp <user>@<remote>
  3. get 'foo\\bar' 'foo-bar'

Expected behavior

`Fetching /home/<user>/foo\bar to foo-bar`

Actual behavior

`File "/home/<user>/foo//bar" not found`.

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.2.7
PSEdition                      Core
GitCommitId                    7.2.7
OS                             Microsoft Windows 10.0.22621
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

PowerShell 7.2.7

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions