Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#969 closed Bug (Fixed)

FileFindNextFile @extended = 0 for folder $Recycle.Bin

Reported by: wraithdu Owned by: J-Paul Mesnage
Milestone: 3.3.1.1 Component: AutoIt
Version: 3.3.1.0 Severity: None
Keywords: Win7 RC1 Cc:

Description

Win7 RC1, AutoIt 3.3.1.0

FileFindNextFile returns @extended = 0 (a file) for the hidden, system folder $Recycle.Bin when searching the root of the drive.

Ex. -

$hFind = FileFindFirstFile("C:\*.*")
While 1
	$file = FileFindNextFile($hFind)
	If @error Then ExitLoop

	ConsoleWrite(@extended & "  :  " & FileGetAttrib("C:\" & $file) & "  :  " & $file & @CRLF)
WEnd
FileClose($hFind)

Attachments (0)

Change History (4)

comment:1 by J-Paul Mesnage, 17 years ago

Keywords: Win7 RC1 added

comment:2 by J-Paul Mesnage, 17 years ago

same thing is true under Vista

comment:3 by J-Paul Mesnage, 17 years ago

Milestone: 3.3.1.1
Owner: set to J-Paul Mesnage
Resolution: Fixed
Status: newclosed

Fixed in version: 3.3.1.1

comment:4 by wraithdu, 17 years ago

I just wanted to add to this, in case the problem you fixed was specific to that directory. I put together a little script to do an extensive search to see if the problem was more widespread. I did a recursive search of my entire C: drive, and out of 121761 files and folders, 2820 folders were incorrectly identified as files by @extended. Again, just adding this as additional info.

BTW, this thing whipped through my whole HDD in ~40 seconds. Impressive speed!

Script -

#include <array.au3>

Dim $aErrors[1] = [0], $total = 0
_Find("C:")
_ArrayInsert($aErrors, 0, "Total Items:  " & $total)
$aErrors[1] = "Total Errors:  " & $aErrors[1]
_ArrayInsert($aErrors, 2, '@extended  :  attrib "D"  :  path')
_ArrayDisplay($aErrors)

Func _Find($path)
	Local $hFind = FileFindFirstFile($path & "\*.*")
	While 1
		Local $item = FileFindNextFile($hFind)
		If @error Then ExitLoop

		Local $v1 = @extended
		Local $v2 = StringInStr(FileGetAttrib($path & "\" & $item), "D")
		If $v2 > 0 Then $v2 = 1

		If $v1 <> $v2 Then
			$aErrors[0] += 1
			_ArrayAdd($aErrors, $v1 & "  :  " & $v2 & "  :  " & $path & "\" & $item)
		EndIf
		$total += 1

		If $v2 Then _Find($path & "\" & $item) ; recurse directory
	WEnd
	FileClose($hFind)
EndFunc

Modify Ticket

Action
as closed The owner will remain J-Paul Mesnage.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.