diff --git a/Changelog.txt b/Changelog.txt index e8cba3c..5912ee9 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,3 +1,6 @@ +Version 2.11 +- Fixed a bug in temporary index loading. + Version 2.10 - Added support for the NTLM-Strong-NTOWF package in Supplemental Credentials (new in Windows Server 2016 TP4) - Added support for initial databases diff --git a/Src/DSInternals.DataStore/DirectorySchema.cs b/Src/DSInternals.DataStore/DirectorySchema.cs index cbd7754..937d931 100644 --- a/Src/DSInternals.DataStore/DirectorySchema.cs +++ b/Src/DSInternals.DataStore/DirectorySchema.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Globalization; + using System.Linq; using DSInternals.Common.Data; using Microsoft.Database.Isam; using DSInternals.Common; @@ -17,6 +18,7 @@ private const string AttributeColIndexPrefix = "INDEX_"; private const string SystemColSuffix = "_col"; private const string SystemColIndexSuffix = "_index"; + private const char IndexNameComponentSeparator = '_'; private IDictionary attributesByInternalId; private IDictionary attributesByName; @@ -382,7 +384,8 @@ // Strip any suffix or prefix from index if(indexName.StartsWith(AttributeColIndexPrefix)) { - indexName = indexName.Substring(AttributeColIndexPrefix.Length, indexName.Length - AttributeColIndexPrefix.Length); + // The index name can start with INDEX_ or INDEX_T_ (e.g. INDEX_T_9EBE46C2), so we get the last component + indexName = indexName.Split(IndexNameComponentSeparator).Last(); } if(indexName.EndsWith(SystemColIndexSuffix)) {