Skip to content

Commit 6d13470

Browse files
committed
Minor edit on string manipulate
1 parent b21cc65 commit 6d13470

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

TestSupport/Helpers/TestData.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ public static string GetCallingAssemblyTopLevelDir(Assembly callingAssembly = nu
139139
const string binDir = @"\bin\";
140140
var pathToManipulate = (callingAssembly ?? Assembly.GetCallingAssembly()).Location;
141141

142-
var indexOfPart = pathToManipulate.IndexOf(binDir, StringComparison.OrdinalIgnoreCase)+1;
142+
var indexOfPart = pathToManipulate.IndexOf(binDir, StringComparison.OrdinalIgnoreCase);
143143
if (indexOfPart <= 0)
144144
throw new Exception($"Did not find '{binDir}' in the assembly. Do you need to provide the callingAssembly parameter?");
145145

146-
return pathToManipulate.Substring(0, indexOfPart - 1);
146+
return pathToManipulate.Substring(0, indexOfPart);
147147
}
148148
}
149149
}

0 commit comments

Comments
 (0)