Modify

Opened 8 years ago

Closed 7 years ago

Last modified 7 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 8 years ago.
FTPEx.au3 (72.8 KB) - added by Jpm 7 years ago.

Download all attachments as: .zip

Change History (9)

Changed 8 years ago by Beege

comment:1 Changed 8 years ago by anonymous59

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 Changed 8 years ago by anonymous

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

comment:3 Changed 8 years ago by Beege

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 Changed 7 years ago by anonymous

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 Changed 7 years ago by Jpm

I am working on it
I attach my proposed solution

Last edited 7 years ago by Jpm (previous) (diff)

Changed 7 years ago by Jpm

comment:6 Changed 7 years ago by guinness

  • Milestone set to 3.3.9.0
  • Owner set to guinness
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [6735] in version: 3.3.9.0

comment:7 Changed 7 years ago by Jpm

  • Component changed from AutoIt to Standard UDFs

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain guinness.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.