diff --git a/src/IronyModManager/Implementation/SingleInstance/SingleInstance.cs b/src/IronyModManager/Implementation/SingleInstance/SingleInstance.cs index 2f1b1ed4..b811dd90 100644 --- a/src/IronyModManager/Implementation/SingleInstance/SingleInstance.cs +++ b/src/IronyModManager/Implementation/SingleInstance/SingleInstance.cs @@ -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."); } diff --git a/src/IronyModManager/ViewModels/Controls/ModifyCollectionControlViewModel.cs b/src/IronyModManager/ViewModels/Controls/ModifyCollectionControlViewModel.cs index a1e82437..85865489 100644 --- a/src/IronyModManager/ViewModels/Controls/ModifyCollectionControlViewModel.cs +++ b/src/IronyModManager/ViewModels/Controls/ModifyCollectionControlViewModel.cs @@ -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))) {