dir() bug in Linux
- Posted by Irv Mullins <irvm at ellijay.com> Apr 20, 2001
- 440 views
>From the html manual: include file.e x = dir(st) Return directory information for the file or directory named by st. If there is no file or directory with this name then -1 is returned. st can contain * and ? wildcards to select multiple files. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Nope. If 'st' contains an asterisk, e.g. x = dir("/home/irv/*.exu") then the program bombs. Same with x = dir(*.exu") when checking the current directory,. Whenever wildcards are used x always returns a -1. The only thing that does work correctly is this: x = dir("/home/irv") without wildcards, it returns the entire directory listing. -------- Regards, Irv