Opened on Jul 10, 2011 at 10:20:05 AM
Closed on Jan 29, 2012 at 10:16:08 AM
Last modified on Feb 9, 2012 at 2:56:33 PM
#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)
Change History (9)
by , on Jul 10, 2011 at 10:20:34 AM
| Attachment: | _FTP_Listtoarray Fix.au3 added |
|---|
comment:2 by , on Aug 9, 2011 at 8:30:58 PM
The Folder/File/File... sequence is also what is returned by both FileOpenDialog() and _FilelReadToArray()
comment:3 by , on Aug 13, 2011 at 8:03:08 PM
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 , on Jan 27, 2012 at 9:54:11 AM
This Bug was not fixed in Release of 3.3.8.0 hope it will be in 3.3.9.0, Quite important!
comment:6 by , on Jan 29, 2012 at 10:16:08 AM
| Milestone: | → 3.3.9.0 |
|---|---|
| Owner: | set to |
| Resolution: | → Fixed |
| Status: | new → closed |
Fixed by revision [6735] in version: 3.3.9.0
comment:7 by , on Feb 9, 2012 at 2:56:33 PM
| Component: | AutoIt → Standard UDFs |
|---|

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.