diff --git a/FluentFTP.Tests/Unit/ParserTests.cs b/FluentFTP.Tests/Unit/ParserTests.cs index 40a96fe3c..9cee01653 100644 --- a/FluentFTP.Tests/Unit/ParserTests.cs +++ b/FluentFTP.Tests/Unit/ParserTests.cs @@ -62,7 +62,7 @@ private static void TestParsing(FtpListParser parser, string path, string[] test public void Machine() { var client = new FtpClient(); - client.SetFeatures(new List { FtpCapability.MLSD }); + client.SetFeatures(new List { FtpCapability.MLST }); var parser = new FtpListParser(client); parser.Init(FtpOperatingSystem.Unix, FtpParser.Machine); diff --git a/FluentFTP/Client/AsyncClient/Connect.cs b/FluentFTP/Client/AsyncClient/Connect.cs index ce9c819b0..917bac5c9 100644 --- a/FluentFTP/Client/AsyncClient/Connect.cs +++ b/FluentFTP/Client/AsyncClient/Connect.cs @@ -195,7 +195,7 @@ await m_stream.ActivateEncryptionAsync(Host, // FIX : #739 prefer using machine listings to fix issues with GetListing and DeleteDirectory if (Config.ListingParser != FtpParser.Custom) { Config.ListingParser = ServerHandler != null ? ServerHandler.GetParser() : FtpParser.Auto; - if (HasFeature(FtpCapability.MLSD)) { + if (HasFeature(FtpCapability.MLST)) { Config.ListingParser = FtpParser.Machine; } } diff --git a/FluentFTP/Client/AsyncClient/GetObjectInfo.cs b/FluentFTP/Client/AsyncClient/GetObjectInfo.cs index 3373c80e8..82bc2a619 100644 --- a/FluentFTP/Client/AsyncClient/GetObjectInfo.cs +++ b/FluentFTP/Client/AsyncClient/GetObjectInfo.cs @@ -18,7 +18,7 @@ public partial class AsyncFtpClient { /// Return information about a remote file system object asynchronously. /// /// - /// You should check the property for the + /// You should check the property for the /// flag before calling this method. Failing to do so will result in an InvalidOperationException /// being thrown when the server does not support machine listings. Returns null if the server response can't /// be parsed or the server returns a failure completion code. The error for a failure @@ -41,7 +41,7 @@ public partial class AsyncFtpClient { FtpReply reply; - var supportsMachineList = HasFeature(FtpCapability.MLSD); + var supportsMachineList = HasFeature(FtpCapability.MLST); FtpListItem result = null; diff --git a/FluentFTP/Client/BaseClient/Listing.cs b/FluentFTP/Client/BaseClient/Listing.cs index 0b7ee9d81..54a076ad6 100644 --- a/FluentFTP/Client/BaseClient/Listing.cs +++ b/FluentFTP/Client/BaseClient/Listing.cs @@ -106,7 +106,7 @@ protected void CalculateGetListingCommand(string path, FtpListOption options, ou } else { // use machine listing if supported by the server - if (!isForceList && Config.ListingParser == FtpParser.Machine && HasFeature(FtpCapability.MLSD)) { + if (!isForceList && Config.ListingParser == FtpParser.Machine && HasFeature(FtpCapability.MLST)) { listcmd = "MLSD"; machineList = true; } @@ -164,7 +164,7 @@ protected bool IsServerSideRecursionSupported(FtpListOption options) { if (!isUseStat) { // if not using machine listing (MSLD) - if ((!isForceList || Config.ListingParser == FtpParser.Machine) && HasFeature(FtpCapability.MLSD)) { + if ((!isForceList || Config.ListingParser == FtpParser.Machine) && HasFeature(FtpCapability.MLST)) { } else { diff --git a/FluentFTP/Client/Modules/ServerFeatureModule.cs b/FluentFTP/Client/Modules/ServerFeatureModule.cs index 319390a97..4e0ab86a8 100644 --- a/FluentFTP/Client/Modules/ServerFeatureModule.cs +++ b/FluentFTP/Client/Modules/ServerFeatureModule.cs @@ -22,7 +22,7 @@ public static void Detect(List capabilities, ref FtpHashAlgorithm } if (featName.StartsWith("MLST") || featName.StartsWith("MLSD")) { - capabilities.AddOnce(FtpCapability.MLSD); + capabilities.AddOnce(FtpCapability.MLST); } else if (featName.StartsWith("MDTM")) { capabilities.AddOnce(FtpCapability.MDTM); diff --git a/FluentFTP/Client/Modules/ServerStringModule.cs b/FluentFTP/Client/Modules/ServerStringModule.cs index df7807a8a..c8e9c13ba 100644 --- a/FluentFTP/Client/Modules/ServerStringModule.cs +++ b/FluentFTP/Client/Modules/ServerStringModule.cs @@ -125,6 +125,7 @@ internal static class ServerStringModule { "LIST", "NLST", "MLSD", + "MLST", "STOR", "STOU", "APPE", diff --git a/FluentFTP/Client/SyncClient/Connect.cs b/FluentFTP/Client/SyncClient/Connect.cs index cdbd9245c..37302d7fc 100644 --- a/FluentFTP/Client/SyncClient/Connect.cs +++ b/FluentFTP/Client/SyncClient/Connect.cs @@ -192,7 +192,7 @@ public virtual void Connect(bool reConnect) { // FIX : #739 prefer using machine listings to fix issues with GetListing and DeleteDirectory if (Config.ListingParser != FtpParser.Custom) { Config.ListingParser = ServerHandler != null ? ServerHandler.GetParser() : FtpParser.Auto; - if (HasFeature(FtpCapability.MLSD)) { + if (HasFeature(FtpCapability.MLST)) { Config.ListingParser = FtpParser.Machine; } } diff --git a/FluentFTP/Client/SyncClient/GetObjectInfo.cs b/FluentFTP/Client/SyncClient/GetObjectInfo.cs index 2af6ae27f..961af4cda 100644 --- a/FluentFTP/Client/SyncClient/GetObjectInfo.cs +++ b/FluentFTP/Client/SyncClient/GetObjectInfo.cs @@ -33,7 +33,7 @@ public FtpListItem GetObjectInfo(string path, bool dateModified = false) { FtpReply reply; - var supportsMachineList = HasFeature(FtpCapability.MLSD); + var supportsMachineList = HasFeature(FtpCapability.MLST); FtpListItem result = null; diff --git a/FluentFTP/Enums/FtpCapability.cs b/FluentFTP/Enums/FtpCapability.cs index 21c167779..226b50d9e 100644 --- a/FluentFTP/Enums/FtpCapability.cs +++ b/FluentFTP/Enums/FtpCapability.cs @@ -14,7 +14,7 @@ public enum FtpCapability : int { /// /// Supports the MLST command (machine listings) /// - MLSD = 2, + MLST = 2, /// /// Supports the SIZE command (get file size) diff --git a/FluentFTP/Enums/FtpListOption.cs b/FluentFTP/Enums/FtpListOption.cs index 81dccf7cb..b7dffa012 100644 --- a/FluentFTP/Enums/FtpListOption.cs +++ b/FluentFTP/Enums/FtpListOption.cs @@ -15,7 +15,7 @@ public enum FtpListOption { /// /// Load the modify date using MDTM when it could not /// be parsed from the server listing. This only pertains - /// to servers that do not implement the MLSD command. + /// to servers that do not implement the MLST command. /// Modify = 1, @@ -23,7 +23,7 @@ public enum FtpListOption { /// Load the file size using the SIZE command when it /// could not be parsed from the server listing. This /// only pertains to servers that do not support the - /// MLSD command. + /// MLST command. /// Size = 2, @@ -34,10 +34,10 @@ public enum FtpListOption { /// /// Show hidden/dot files. This only pertains to servers - /// that do not support the MLSD command. This option + /// that do not support the MLST command. This option /// makes use the non standard -a parameter to LIST to /// tell the server to show hidden files. Since it's a - /// non-standard option it may not always work. MLSD listings + /// non-standard option it may not always work. MLST listings /// have no such option and whether or not a hidden file is /// shown is at the discretion of the server. /// @@ -45,7 +45,7 @@ public enum FtpListOption { /// /// Force the use of OS-specific listings (LIST command) even if - /// machine listings (MLSD command) are supported by the server + /// machine listings (MLST command) are supported by the server /// ForceList = 8, diff --git a/FluentFTP/Helpers/FtpListParser.cs b/FluentFTP/Helpers/FtpListParser.cs index f60b08176..e1e124dda 100644 --- a/FluentFTP/Helpers/FtpListParser.cs +++ b/FluentFTP/Helpers/FtpListParser.cs @@ -222,7 +222,7 @@ private bool IsWrongParser() { } private bool IsWrongMachineListing() { - return CurrentParser == FtpParser.Machine && client != null && !client.HasFeature(FtpCapability.MLSD); + return CurrentParser == FtpParser.Machine && client != null && !client.HasFeature(FtpCapability.MLST); } ///