mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-29 03:14:04 +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(
|
||||
_path,
|
||||
moduleName + ".*",
|
||||
"*",
|
||||
(_recursive) ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly);
|
||||
|
||||
if ((matchedFiles != null) && (matchedFiles.Length >= 1))
|
||||
{
|
||||
foreach (string matchedFile in matchedFiles)
|
||||
{
|
||||
if (Path.GetFileNameWithoutExtension(matchedFile.ToLowerInvariant()) == moduleName.ToLowerInvariant())
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -45,13 +47,13 @@ namespace Lextm.SharpSnmpLib.Mib
|
||||
{
|
||||
return md.Modules [0];
|
||||
}
|
||||
}
|
||||
catch
|
||||
} catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user