Skip to content

Commit 59adec2

Browse files
committed
Fix an exception while Bilibili file is not existed on repair
1 parent c7dc10a commit 59adec2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CollapseLauncher/Classes/Interfaces/Class/ProgressBase.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ protected async ValueTask FetchBilibiliSDK(CancellationToken token)
444444
if (sdkDllFile != null)
445445
{
446446
// Try create the file if not exist or open an existing one
447-
await using (Stream sdkDllStream = sdkDllFile.Open(entry.Length < sdkDllFile.Length ? FileMode.Create : FileMode.OpenOrCreate))
447+
await using (Stream sdkDllStream = sdkDllFile.Open(!sdkDllFile.Exists || entry.Length < sdkDllFile.Length ? FileMode.Create : FileMode.OpenOrCreate))
448448
{
449449
// Initiate the Crc32 hash
450450
Crc32 hash = new Crc32();

0 commit comments

Comments
 (0)