﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
3011	_FileListToArrayRec does not closes file handle	MrCreatoR <mscreator@…>	Melba23	"After we read files in subfolders, the folder handle is not closed, therefore it can not be deleted/changed.
Reproducing example:


{{{
#include <Array.au3>
#include <File.au3>

$sDir = @TempDir & '\test_dir\'
$sSubDir = $sDir & 'sub_dir'

DirCreate($sSubDir)
FileWrite($sDir & '\test.txt', '')

$aList = _FileListToArrayRec($sDir, Default, 4 + 8 + 1, 1)
_ArrayDisplay($aList)

MsgBox(64, '[_FileListToArrayRec]Before DirRemove', FileExists($sDir) & ', ' & FileExists($sSubDir)) ;1, 1
DirRemove($sDir, 1)
MsgBox(64, '[_FileListToArrayRec]After DirRemove', FileExists($sDir) & ', ' & FileExists($sSubDir)) ;1, 1
}}}

To fix this issue, replace in function this:

{{{
		; Close current search
		FileClose($hSearch)
}}}

with this:

{{{
		; Close current search
		If $iHide_HS Or $iHide_Link Then
			DllCall($hDLL, 'int', 'FindClose', 'ptr', $hSearch)
		Else
			FileClose($hSearch)
		EndIf
}}}

"	Bug	closed	3.3.13.21	Standard UDFs	3.3.12.0	None	Fixed	File List Array Recursive Handle Delete Dir	
