Skip to content

Commit dfa9b4e

Browse files
author
Sewer56
committed
Improved: ConfigService now clones ItemsByFolder to avoid issues with concurrent access
1 parent b71e11f commit dfa9b4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/Reloaded.Mod.Loader.IO/Services/ConfigServiceBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ private void OnDeleteDirectory(object sender, FileSystemEventArgs e)
188188
// Otherwise iterate over all possible subfolders.
189189
// This is a bit inefficient, but with nested mods, it's the only way (without creating a whole tree of nodes).
190190
// Can rack up upwards of 20ms in huge mod directories.
191-
foreach (var item in ItemsByFolder)
191+
foreach (var item in ItemsByFolder.ToArray())
192192
{
193193
var modFolder = item.Key;
194194
if (!Path.EndsInDirectorySeparator(modFolder))

0 commit comments

Comments
 (0)