filesystem: Fix benign use of loop variable in closure
This closure never outlives a single loop iteration.
This commit is contained in:
@@ -199,13 +199,14 @@ namespace OpenRA.FileSystem
|
||||
|
||||
foreach (var ext in exts)
|
||||
{
|
||||
var possibleName = filename + ext;
|
||||
var folder = MountedFolders
|
||||
.Where(x => x.Exists(filename + ext))
|
||||
.Where(x => x.Exists(possibleName))
|
||||
.MaxByOrDefault(x => x.Priority);
|
||||
|
||||
if (folder != null)
|
||||
{
|
||||
s = folder.GetContent(filename + ext);
|
||||
s = folder.GetContent(possibleName);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user