Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bcssov committed Mar 20, 2024
1 parent ebab952 commit 4f49ae9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ private static string GetMutexName()
{
path = Path.Combine(tempFile, $"CoreFXPipe_{sb}");
sb.Remove(sb.Length - 1, 1);
if (sb.Length < 0)
if (sb.Length <= 0)
{
throw new ArgumentException("Temp Path is too long. Cannot generate SingleInstance.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ protected virtual IModCollection CopyCollection(string requestedName, out int? c
{
var collections = modCollectionService.GetAll();
var count = collections.Count(p => p.Name.Equals(requestedName, StringComparison.OrdinalIgnoreCase));
name = string.Empty;
name = count == 0 ? requestedName : $"{requestedName} ({count})";
while (collections.Any(p => p.Name.Equals(name, StringComparison.OrdinalIgnoreCase)))
{
Expand Down

0 comments on commit 4f49ae9

Please sign in to comment.