Skip to content

Commit 707af27

Browse files
committed
Fix mod installer race condition
1 parent f234783 commit 707af27

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@
3434
// You can specify all the values or you can default the Build and Revision Numbers
3535
// by using the '*' as shown below:
3636
// [assembly: AssemblyVersion("1.0.*")]
37-
[assembly: AssemblyVersion("18.05.3.*")]
37+
[assembly: AssemblyVersion("18.05.4.*")]
3838
[assembly: AssemblyFileVersion("1.0.0.0")]

src/GameModder.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ public void Uninstall() {
121121
}
122122

123123
public void DownloadMod(string url) {
124-
Console.WriteLine("Starting download");
124+
Console.WriteLine("Starting mod download");
125+
126+
while (string.IsNullOrEmpty(Info.CurrentGamePath))
127+
Thread.Sleep(100);
125128

126129
Uri uri = new Uri(url);
127130

@@ -133,8 +136,6 @@ public void DownloadMod(string url) {
133136

134137
string modPath = Path.Combine(modRoot, Path.GetFileName(uri.AbsolutePath));
135138

136-
Console.WriteLine($"Downloading mod");
137-
138139
OnStart?.Invoke();
139140
try {
140141

0 commit comments

Comments
 (0)