Browse Source

Issue 2380 – Local directories sometimes cannot be deleted

https://winscp.net/tracker/2380
(cherry picked from commit ec910f92ccc9e8f36763331815933e3ddae0ed7d)

Source commit: f260f5a62bfb2d550780f6111ea0be76b6ae0d31
Martin Prikryl 5 months ago
parent
commit
62f3211df3
1 changed files with 2 additions and 0 deletions
  1. 2 0
      source/core/Common.cpp

+ 2 - 0
source/core/Common.cpp

@@ -2566,6 +2566,8 @@ static bool __fastcall DoRecursiveDeleteFile(
           }
           while (Result && (FindNextUnchecked(SearchRec) == 0));
 
+          SearchRec.Close();
+
           if (Result)
           {
             Result = RemoveDir(ApiPath(FileName));