diff --git a/Form1.cs b/Form1.cs index 9e379f1..df49885 100644 --- a/Form1.cs +++ b/Form1.cs @@ -202,7 +202,7 @@ private void PeriodicCheckTimer_Tick(object sender, EventArgs e) ModManager.UpdateReadOnlyStatus(); } - // Normally this wouldn't be necessary because of the fact that all index files are refreshed when the loader boots up, but for the folks that leave the mod loader open for days on end, we should refresh it all every once in a while + // Normally this wouldn't be necessary because of the fact that all index files are refreshed when the loader boots up, but for the folks that leave the mod loader open for days on end, we should refresh the global index file every once in a while private void ForceAutoUpdateRefresh_Tick(object sender, EventArgs e) { ModManager.ResetGlobalIndexFile(); @@ -801,7 +801,7 @@ private void loadButton_Click(object sender, EventArgs e) internal bool CurrentlySyncing = false; internal bool syncErrored; internal string syncErrorMessage; - internal int syncFailedDownloadCount; + internal string[] syncFailedDownloadMods = null; internal string syncKosherProfileName; private void syncButton_Click(object sender, EventArgs e) @@ -834,7 +834,7 @@ private void syncButton_Click(object sender, EventArgs e) syncErrored = true; syncErrorMessage = "The syncing process halted prematurely!"; - syncFailedDownloadCount = 0; + syncFailedDownloadMods = null; syncKosherProfileName = ""; waiting.ShowDialog(this); @@ -849,7 +849,15 @@ private void syncButton_Click(object sender, EventArgs e) } else { - this.ShowBasicButton("Added a new profile named \"" + syncKosherProfileName + "\".\n" + (syncFailedDownloadCount == 0 ? "No" : syncFailedDownloadCount.ToString()) + " mod" + (syncFailedDownloadCount == 1 ? "" : "s") + " failed to sync.", "OK", null, null); + int syncFailedDownloadCount = syncFailedDownloadMods.Length; + if (syncFailedDownloadCount == 0) + { + this.ShowBasicButton("Added a new profile named \"" + syncKosherProfileName + "\".\nNo mods failed to sync.", "OK", null, null); + } + else + { + this.ShowBasicButton("Added a new profile named \"" + syncKosherProfileName + "\".\n\n" + syncFailedDownloadCount.ToString() + " mod" + (syncFailedDownloadCount == 1 ? "" : "s") + " failed to sync:\n" + string.Join("\n", syncFailedDownloadMods).Trim(), "OK", null, null); + } } } } diff --git a/ServerSyncPopup.cs b/ServerSyncPopup.cs index ad3efd4..450b092 100644 --- a/ServerSyncPopup.cs +++ b/ServerSyncPopup.cs @@ -64,7 +64,7 @@ private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) ModProfile creatingProfile = new ModProfile(); creatingProfile.ProfileData = new Dictionary(); - int failedDownloadCount = 0; + List failedDownloadMods = new List(); // Add our current mods into the brand new profile, and specify that they are disabled ModProfile currentProf = BaseForm.ModManager.GenerateProfile(); @@ -146,7 +146,7 @@ private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) } else { - failedDownloadCount++; + failedDownloadMods.Add(debugModName); } } @@ -179,7 +179,7 @@ private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) string kosherProfileName = kosherServerName + " Synced Mods"; BaseForm.ModManager.ProfileList[kosherProfileName] = creatingProfile; BaseForm.syncKosherProfileName = kosherProfileName; - BaseForm.syncFailedDownloadCount = failedDownloadCount; + BaseForm.syncFailedDownloadMods = failedDownloadMods.ToArray(); SetDebugText("Done!"); BaseForm.syncErrored = false;