Modify

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#1970 closed Bug (Fixed)

Bug added to internal __FTP_ListToArray()

Reported by: Beege Owned by: guinness
Milestone: 3.3.9.0 Component: Standard UDFs
Version: 3.3.7.13 Severity: None
Keywords: Cc:

Description

Very sorry about this but some time back I submitted a request here http://www.autoitscript.com/trac/autoit/ticket/1499 that had a mistake in it. I thought it got caught before being added to the beta but it didnt. The bug is that if the user specifys only files or only dirs to be returned, nothing gets returned due to incorrect rediming at the end. Attached is the function pulled from the beta udf with all changes/fixs surrounded in xxxxxxxxxxxxxxxx's. The example verifys all possible return methods are working correctly this time and demonstrates current broken code. Again Im very sorry about this.

Attachments (2)

_FTP_Listtoarray Fix.au3 (7.4 KB ) - added by Beege 15 years ago.
FTPEx.au3 (72.8 KB ) - added by J-Paul Mesnage 14 years ago.

Download all attachments as: .zip

Change History (9)

by Beege, 15 years ago

Attachment: _FTP_Listtoarray Fix.au3 added

comment:1 by anonymous59, 15 years ago

I'd still argue that the smaller version from BT #1499 is a better choice as it results in less code to maintain, is faster, and it's only functional difference is useful.

Returning the results in Folder/File/File.../File/Folder/File/File.../File/Folder... sequence allows you to determine which files are within which folders. That information is lost in the larger version where the array is returned in "Folder/Folder.../Folder/File/File.../File" order.

comment:2 by anonymous, 15 years ago

The Folder/File/File... sequence is also what is returned by both FileOpenDialog() and _FilelReadToArray()

comment:3 by Beege, 15 years ago

Wait your function just returns the files/folders in alphabetical order. Im not following you when you say it helps you determine which files are in which folders. Determining what files are in what folders would require some form of recursion. Also FileOpenDialog() only returns the file paths of the files you selected. When the documentation says "Results for multiple selections are "Directory|file1|file2|...", that first directory you see is the directory your choosing files from and is the only directory returned. All other dirs (the ones you selected) will not be returned.

_FileListtoArray does return an alphabetized list the same as your function. But that kind of a change could still be considered "script breaking" which im always agains unless it opens doors to future code or is significatly faster.

comment:4 by anonymous, 14 years ago

This Bug was not fixed in Release of 3.3.8.0 hope it will be in 3.3.9.0, Quite important!

comment:5 by J-Paul Mesnage, 14 years ago

I am working on it
I attach my proposed solution

Last edited 14 years ago by J-Paul Mesnage (previous) (diff)

by J-Paul Mesnage, 14 years ago

Attachment: FTPEx.au3 added

comment:6 by guinness, 14 years ago

Milestone: 3.3.9.0
Owner: set to guinness
Resolution: Fixed
Status: newclosed

Fixed by revision [6735] in version: 3.3.9.0

comment:7 by J-Paul Mesnage, 14 years ago

Component: AutoItStandard UDFs

Modify Ticket

Action
as closed The owner will remain guinness.

Add Comment


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