From: fantam::mailandnews::com at: 14-Aug-2000 17:01
In the following script, 'list-dirs is a function that returns the
directory tree under the directory specified as an argument.
On WinNT, using REBOL/Core 18.104.22.168.1, that script will throw an error
when it encounters a directory that has a dot in its name (for
example, "temp.old"). Furthermore, the error is thrown only if that
directory is a second level sub-directory of the argument (for example
and not "%/c/temp/temp.old").
The most confusing thing is that if I remove the local definition of
'dirtree in the func spec, no error is thrown at all.
I do not understand what is happening.
list-dirs: func [
"returns dir tree as block"
dir [file!] "root dir"
/local dirtree [block!]
if count = 0 [dirtree: make block! 100]
count: count + 1
foreach name read dir [
if dir? dir/:name [
append dirtree dir/:name
print list-dirs dir