Permalink
Browse files

fix archive substring call

  • Loading branch information...
1 parent 8a1448f commit affc9d09bc7aef8d3132f48bc7df87236d7ba94a @ssandler ssandler committed Feb 26, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 TeslaSQL/Agents/Slave.cs
View
@@ -490,7 +490,7 @@ public Slave(IDataUtils sourceDataUtils, IDataUtils destDataUtils, Logger logger
}
if (confTable.Name.EndsWith("Archive")) {
//if we have an archive table, we want to check if we also have the non-archive version of it configured in CT
- string nonArchiveTableName = confTable.Name.Substring(0, confTable.Name.Length - confTable.Name.LastIndexOf("Archive") + 1);
+ string nonArchiveTableName = confTable.Name.Substring(0, confTable.Name.LastIndexOf("Archive"));
if (changeTables.Any(s => String.Compare(s.name, nonArchiveTableName, StringComparison.OrdinalIgnoreCase) == 0)) {
//if the non-archive table has any changes, we grab the associated table configuration and pair them
var nonArchiveTable = Config.Tables.First(t => String.Compare(t.Name, nonArchiveTableName, StringComparison.OrdinalIgnoreCase) == 0);

0 comments on commit affc9d0

Please sign in to comment.