Fixed deadlock

This commit is contained in:
Alex 2023-02-25 02:44:13 +02:00
parent 4519204580
commit 14aa071e7f
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

@ -410,7 +410,9 @@ namespace VirtualFileSystem
{ {
foreach (auto Child in NodeToDelete->Children) foreach (auto Child in NodeToDelete->Children)
{ {
VFSLock.Unlock();
FileStatus Status = Delete(GetPathFromNode(Child).Get(), true); FileStatus Status = Delete(GetPathFromNode(Child).Get(), true);
VFSLock.Lock(__FUNCTION__);
if (Status != FileStatus::OK) if (Status != FileStatus::OK)
{ {
vfsdbg("Failed to delete child %s with status %d. (%s)", Child->Name, Status, Path); vfsdbg("Failed to delete child %s with status %d. (%s)", Child->Name, Status, Path);