Modify ↓
Opened 17 years ago
Closed 17 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)
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: