Since we can't reproduce it I think you might need to try on your own. The 'dir' function is an m-file which means it is written in Octave's own scripting language and you can step through the code line-by-line with the debugger until you notice something odd.

Try the following

You can just hit <RETURN> to keep executing dbnext and advance line by line.

The "dir" function is supposed to list the files within a directory. It seems to find the files, and to properly store the other attributes like date into a variable. However, the stored or displayed names are empty.