Silverfrost Forums

Welcome to our forums

GET_FILES@ returns error when there is none

26 Mar 2015 10:10 #16004

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.

26 Mar 2015 11:20 #16005

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.

27 Mar 2015 10:00 #16009

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.

27 Mar 2015 2:16 #16011

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

Please login to reply.