Open nemecben opened 2 years ago
EPDM and SW are all over the place with case. I believe a better solution is to change the Dictionary to use a case-insensitive comparer:
private Dictionary <String, EdmLib.IEdmVault20> connectedVaults = new Dictionary<string, EdmLib.IEdmVault20>(StringComparer.OrdinalIgnoreCase);
That is absolutely better than what I have, I had not discovered that part of Dictionary container. Seems obvious now that you pointed it out.
For some reason many of the paths being opened are lowercase so the vault name extracted from directories[1] != vaultName much of the time.
if (!connectedVaults.ContainsKey(vaultName))
I do not know if this is a problem in our system's configurations or what is causing it. I noticed the lower case while debugging then confirmed by opening several sldasm files in Pack and Go which shows the ref'd paths. I worked around it by adding .ToUpper() when adding to the connectedVaults dictionary. Also add it when setting vaultName to directories[1]. I'm not sure that's a good solution. But since windows filesystem is not case sensitive I don't know that having two vaults whose names only differ by case is a good idea anyway.