Skip to content

Commit 179ea59

Browse files
authored
Fix: Fixed possible crash when adding files and folders (#13770)
1 parent 962a198 commit 179ea59

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Files.App/Utils/Storage/Collection/ConcurrentCollection.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,14 @@ public void OrderOne(Func<List<T>, IEnumerable<T>> func, T item)
257257
Insert(index, item);
258258
}
259259

260+
public List<T> ToList()
261+
{
262+
lock (syncRoot)
263+
{
264+
return Enumerable.ToList(this);
265+
}
266+
}
267+
260268
int IList.Add(object? value)
261269
{
262270
if (value is null)

0 commit comments

Comments
 (0)