Os.Filenames() Bug?

Either there’s a mistake in the documentation, or I’m doing something silly … os.filenames() doesn’t seem to work without the “optional” second argument.

print(os.filenames(“d:\”)[1])

proeduces an error:

*** [string “print(os.filenames(“d:\”)[1])”]:1: bad argument #2 to ‘filenames’ (expected a string or table with strings)
*** stack traceback:
*** [C]: in function ‘filenames’
*** [string “print(os.filenames(“d:\”)[1])”]:1: in main chunk

while:

print(os.filenames(“d:\”, “*.wav”)[1])

works fine.

~A

I tried this too.

Looks like it’s not optional?

I will update the docs in SVN.

Yay, but it should. Just have done so for the next update…