Skip to content

Commit c32319d

Browse files
committed
[Misc] Fix premature download when user cancel initial install
1 parent b0bae37 commit c32319d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CollapseLauncher/Classes/InstallManagement/Base/InstallManagerBase.Sophon.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,14 @@ private ValueTask RunSophonAssetDownloadThread(HttpClient client,
959959
return RunSophonAssetUpdateThread(client, asset, parallelOptions);
960960
}
961961

962+
// HACK: To avoid user unable to continue the download due to executable being downloaded completely,
963+
// append "_tempSophon" on it.
964+
string filename = Path.GetFileNameWithoutExtension(assetName);
965+
if (filename.Equals(GameVersionManager.GamePreset.GameExecutableName, StringComparison.OrdinalIgnoreCase))
966+
{
967+
filePath += "_tempSophon";
968+
}
969+
962970
// Get the target and temp file info
963971
FileInfo existingFileInfo = new FileInfo(filePath).EnsureNoReadOnly();
964972

0 commit comments

Comments
 (0)