Modify ↓
Opened 16 years ago
Closed 16 years ago
#652 closed Bug (No Bug)
_FileListToArray() does not returnarray if no file s found
Reported by: | RickJ | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.2.12.1 | Severity: | None |
Keywords: | Cc: |
Description
if _FileListToArray() doesn't find any files it does not return an array. It should probably return an array of one or two elements with the first element having a value of zero.
Currently @error is set to a value of 4 to indicate no files found so it's possible to workaround this. IMHO a function should always return the same data type.
Attachments (0)
Change History (1)
comment:1 Changed 16 years ago by Valik
- Resolution set to No Bug
- Status changed from new to closed
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.
Note: See
TracTickets for help on using
tickets.
Assuming you are writing correct code, then the fact that it doesn't return an array on error is a non-issue. In fact proper code doesn't even have to check @error. Proper code would resemble: