Browse Source

Reusing RemotePath.AddDirectorySeparator

Source commit: be755e6683731bee0d111a98855f6cb7bef09c3b
Martin Prikryl 4 years ago
parent
commit
2f5bb1ba74
1 changed files with 1 additions and 4 deletions
  1. 1 4
      dotnet/Session.cs

+ 1 - 4
dotnet/Session.cs

@@ -800,10 +800,7 @@ namespace WinSCP
                     filemask = "*";
                 }
                 string localPath = Path.Combine(localDirectory, filemask);
-                const string remoteSeparator = "/";
-                string remotePath =
-                    remoteDirectory +
-                    (remoteDirectory.EndsWith(remoteSeparator, StringComparison.Ordinal) ? string.Empty : remoteSeparator);
+                string remotePath = RemotePath.AddDirectorySeparator(remoteDirectory);
                 return PutFiles(localPath, remotePath, remove, options);
             }
         }