浏览代码

Change: Renamed RemotePath.CombinePaths to RemotePath.Combine

Source commit: 7afbd20bcaa9bad7ed474907cc40f7a7659d46e3
Martin Prikryl 7 年之前
父节点
当前提交
fa2a0ef375
共有 2 个文件被更改,包括 8 次插入2 次删除
  1. 6 0
      dotnet/RemotePath.cs
  2. 2 2
      dotnet/Session.cs

+ 6 - 0
dotnet/RemotePath.cs

@@ -24,7 +24,13 @@ namespace WinSCP
             return path + mask;
         }
 
+        [Obsolete("Use RemotePath.Combine method")]
         public static string CombinePaths(string path1, string path2)
+        {
+            return Combine(path1, path2);
+        }
+
+        public static string Combine(string path1, string path2)
         {
             if (path1 == null)
             {

+ 2 - 2
dotnet/Session.cs

@@ -633,7 +633,7 @@ namespace WinSCP
 
                         if (fileInfo.IsDirectory && allDirectories)
                         {
-                            foreach (RemoteFileInfo fileInfo2 in DoEnumerateRemoteFiles(RemotePath.CombinePaths(path, fileInfo.Name), regex, options, false))
+                            foreach (RemoteFileInfo fileInfo2 in DoEnumerateRemoteFiles(RemotePath.Combine(path, fileInfo.Name), regex, options, false))
                             {
                                 yield return fileInfo2;
                             }
@@ -1330,7 +1330,7 @@ namespace WinSCP
         [Obsolete("Use RemotePath.CombinePaths")]
         public string CombinePaths(string path1, string path2)
         {
-            return RemotePath.CombinePaths(path1, path2);
+            return RemotePath.Combine(path1, path2);
         }
 
         public void AddRawConfiguration(string setting, string value)