Browse Source

Bug fix: Path argument of Session.PutFile is incorrectly escaped

Source commit: e36dc2448b1b83ab03986feefa1535b631a19f82
Martin Prikryl 4 years ago
parent
commit
0d2a93b943
1 changed files with 1 additions and 1 deletions
  1. 1 1
      dotnet/Session.cs

+ 1 - 1
dotnet/Session.cs

@@ -827,7 +827,7 @@ namespace WinSCP
                 _process.StdIn = stream ?? throw Logger.WriteException(new ArgumentNullException(nameof(stream)));
                 _process.StdIn = stream ?? throw Logger.WriteException(new ArgumentNullException(nameof(stream)));
                 try
                 try
                 {
                 {
-                    remoteFilePath = RemotePath.EscapeFileMask(remoteFilePath);
+                    remoteFilePath = RemotePath.EscapeOperationMask(remoteFilePath);
                     TransferOperationResult operationResult = DoPutFiles("-", remoteFilePath, false, options);
                     TransferOperationResult operationResult = DoPutFiles("-", remoteFilePath, false, options);
                     operationResult.Check();
                     operationResult.Check();
                     // Assert that any transfer took place at all
                     // Assert that any transfer took place at all