Skip to content

Commit

Permalink
Improved: ConfigService now clones ItemsByFolder to avoid issues with…
Browse files Browse the repository at this point in the history
… concurrent access
  • Loading branch information
Sewer56 committed Oct 17, 2024
1 parent b71e11f commit dfa9b4e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ private void OnDeleteDirectory(object sender, FileSystemEventArgs e)
// Otherwise iterate over all possible subfolders.
// This is a bit inefficient, but with nested mods, it's the only way (without creating a whole tree of nodes).
// Can rack up upwards of 20ms in huge mod directories.
foreach (var item in ItemsByFolder)
foreach (var item in ItemsByFolder.ToArray())
{
var modFolder = item.Key;
if (!Path.EndsInDirectorySeparator(modFolder))
Expand Down

0 comments on commit dfa9b4e

Please sign in to comment.