mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-17 01:12:40 +00:00
SNMP MIB Compiler: Resolve MIB files in a case-insensitive way
This commit is contained in:
parent
8c4d1909f4
commit
e80e7a10d4
@ -31,12 +31,14 @@ namespace Lextm.SharpSnmpLib.Mib
|
|||||||
{
|
{
|
||||||
string[] matchedFiles = Directory.GetFiles(
|
string[] matchedFiles = Directory.GetFiles(
|
||||||
_path,
|
_path,
|
||||||
moduleName + ".*",
|
"*",
|
||||||
(_recursive) ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly);
|
(_recursive) ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly);
|
||||||
|
|
||||||
if ((matchedFiles != null) && (matchedFiles.Length >= 1))
|
if ((matchedFiles != null) && (matchedFiles.Length >= 1))
|
||||||
{
|
{
|
||||||
foreach (string matchedFile in matchedFiles)
|
foreach (string matchedFile in matchedFiles)
|
||||||
|
{
|
||||||
|
if (Path.GetFileNameWithoutExtension(matchedFile.ToLowerInvariant()) == moduleName.ToLowerInvariant())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -45,13 +47,13 @@ namespace Lextm.SharpSnmpLib.Mib
|
|||||||
{
|
{
|
||||||
return md.Modules [0];
|
return md.Modules [0];
|
||||||
}
|
}
|
||||||
}
|
} catch
|
||||||
catch
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user