View previous topic :: View next topic |
Author |
Message |
wahorger

Joined: 13 Oct 2014 Posts: 1257 Location: Morrison, CO, USA
|
Posted: Thu Mar 26, 2015 11:10 pm Post subject: GET_FILES@ returns error when there is none |
|
|
In my application, I allow the user to search for a file (or files) using a pattern they specify. My tester reported that an error occurs (returned ERROR_CODE is non-zero), and I have verified this does occur.
Once this error occurs (for the second and subsequent tries), the ERROR_CODE is returned as 183 (IOSTAT says this is a bad macro being executed), but the number of files found is the appropriate number.
The documentation only shows the error ERANGE when the array to store the names is not big enough, but I cannot find the errno.ins file the documentation references. I did find errno.h, where ERANGE=1001.
I'm thinking that unless the ERANGE error is returned to trust the returned number of files. |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Fri Mar 27, 2015 12:20 am Post subject: |
|
|
I have had a look at the code and I think that you are right.
The routine should only return 0 or ERANGE.
It is incorrectly reporting an error when the search ends. |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Fri Mar 27, 2015 11:00 am Post subject: |
|
|
This bug has now been fixed but the fix may not get into the next full release.
ERROR_NO_MORE_FILES (=18) was being reported when the search ended.
In the mean time an error value of 18 can be ignored. |
|
Back to top |
|
 |
wahorger

Joined: 13 Oct 2014 Posts: 1257 Location: Morrison, CO, USA
|
Posted: Fri Mar 27, 2015 3:16 pm Post subject: |
|
|
Thanks, Paul. Glad it wasn't a tough one.
The error I got was a 183. Curious.
I can certainly wait for the next release!
Bill |
|
Back to top |
|
 |
|