diff --git a/UotanToolbox/Common/StringHelper.cs b/UotanToolbox/Common/StringHelper.cs index e7633d8..676e05d 100644 --- a/UotanToolbox/Common/StringHelper.cs +++ b/UotanToolbox/Common/StringHelper.cs @@ -58,7 +58,7 @@ public static string[] FastbootDevices(string FastbootInfo) public static string[] HDCDevices(string HDCInfo) { string[] devices = HDCInfo.Split(separator, StringSplitOptions.RemoveEmptyEntries); - devices = devices.Where(s => !String.IsNullOrEmpty(s) && !s.Contains("[Empty]")).ToArray(); + devices = devices.Where(s => !String.IsNullOrEmpty(s) && !s.Contains("[Empty]") && !s.Contains("FreeChannelContinue")).ToArray(); return devices; } @@ -193,7 +193,11 @@ public static string RemoveLineFeed(string str) { string[] lines = str.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); string result = string.Concat(lines); - return string.IsNullOrEmpty(result) || result.Contains("not found") || result.Contains("dialog on your device") || result.Contains("device offline") || result.Contains("closed") + if (result.Contains("FreeChannelContinue")) + { + result = lines[0]; + } + return string.IsNullOrEmpty(result) || result.Contains("not found") || result.Contains("dialog on your device") || result.Contains("device offline") || result.Contains("closed") || result.Contains("fail!") ? "--" : result; }