Jump to content

_FileListToArray returns array[0]=0


Recommended Posts

It think the coding will be much easier if the return would be always an array with the first element being 0 if no file /dir was found.

The @error will differentiate which kind of error occurs.

The loop 1 to array[0] will do no loop execution.

PS Looking at the code make the checking of the '.' or '..' dir useless in the beta as the FileFindNextfile is not returning anymore such dir.

Link to post
Share on other sites

It think the coding will be much easier if the return would be always an array with the first element being 0 if no file /dir was found.

The @error will differentiate which kind of error occurs.

The loop 1 to array[0] will do no loop execution.

I tried to make it follow the same standard as the built in funcs which according to the comment below from the IniReadSectionNames() documentation is to not to create an array if nothing is found.

The number of elements returned will be in $result[0]. If an @error occurs, no array is created.

PS Looking at the code make the checking of the '.' or '..' dir useless in the beta as the FileFindNextfile is not returning anymore such dir.

I will change this and submit it to JDEB for inclusion in the next version.

-SolidSnake

P.S. Thanks for the feedback.

Edit:Done. Sent updated version to JDEB

Edited by SolidSnake
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Link to post
Share on other sites
  • Developers

Edit:Done. Sent updated version to JDEB

Where did you sent it to ? Its not in my PM or Email inbox......

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

Where did you sent it to ? Its not in my PM or Email inbox......

Sorry It did not get to you. I just sent it again to your PM inbox

-SolidSnake

Edited by SolidSnake
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...