
7 Feb
2006
7 Feb
'06
11:13 a.m.
Paul Giaccone wrote:
I am iterating over the subdirectories in a directory. The code I have for this has always worked up until now, but now it is crashing when I create the iterator (ask "What did you change?" if you like; the answer is "If I knew that...").
My question is: what can cause the creation of an iterator to crash? Looking at the documentation, directory_iterator(my_path) throws if !exists(my_path), which is fair enough. This check is already in my code, however, and does not report that the path does not exist.
My mistake. Everything is behaving correctly. The string to which my environment variable was set had a space at the beginning. I've taken this out and it's working again. Paul