Skip to content

Commit

Permalink
fix: SongStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
LeZi9916 committed Feb 7, 2025
1 parent c753c61 commit 18e53e0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Assets/Plugins/MajSimai
13 changes: 12 additions & 1 deletion Assets/Scripts/Utils/SongStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,21 @@ static async Task<SongCollection> GetCollection(string rootPath)

tasks.Add(parsingTask);
}
await Task.WhenAll(tasks);
var allTask = Task.WhenAll(tasks);

while(!allTask.IsCompleted)
{
await Task.Yield();
}
foreach (var task in tasks)
{
if (task.IsFaulted)
{
MajDebug.LogException(task.Exception);
continue;
}
charts.Add(task.Result);
}
return new SongCollection(thisDir.Name, charts.ToArray());
}
catch(Exception e)
Expand Down

0 comments on commit 18e53e0

Please sign in to comment.