Skip to content

Commit

Permalink
fixed: false positive error report when moving mods.
Browse files Browse the repository at this point in the history
  • Loading branch information
kianzarrin committed Oct 4, 2022
1 parent fdb2f63 commit b49abd0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion LoadOrderInjections/Injections/SubscriptionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ public static string ToSTR(this ref UGCDetails result)
try {
Log.Called();
var dirs = new HashSet<string>(RootDir.GetDirectories().Select(item => item.FullName));
foreach (var dir in dirs) {
foreach (var dir in dirs.ToArray() /* need clone*/) {
try {
string path1 = ToIncludedPath(dir);
string path2 = ToExcludedPath2(dir);
Expand All @@ -900,6 +900,7 @@ public static string ToSTR(this ref UGCDetails result)
$"path2 exists: '{path2}' failed. dirs.Contains(path2)={dirs.Contains(path2)}");
Directory.Delete(path2, true);
Directory.Move(path1, path2);
dirs.Remove(path1);
}
} catch(Exception ex) {
ex.Log($"dir='{dir}', dirs='{dirs.ToSTR()}'",false);
Expand Down

0 comments on commit b49abd0

Please sign in to comment.