Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

any adb.exe file name #207

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion SharpAdbClient/AdbCommandLineClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,14 @@ public AdbCommandLineClient(string adbPath, ILogger<AdbCommandLineClient> logger

if (isWindows)
{
if (!string.Equals(Path.GetFileName(adbPath), "adb.exe", StringComparison.OrdinalIgnoreCase))
if (!adbPath.ToLower().Contains("adb.exe"))
{
throw new ArgumentOutOfRangeException(nameof(adbPath), $"{adbPath} does not seem to be a valid adb.exe executable. The path must end with `adb.exe`");
}
//if (!string.Equals(Path.GetFileName(adbPath), "adb.exe", StringComparison.OrdinalIgnoreCase))
//{
// throw new ArgumentOutOfRangeException(nameof(adbPath), $"{adbPath} does not seem to be a valid adb.exe executable. The path must end with `adb.exe`");
//}
}
else if (isUnix)
{
Expand Down