20 Feb
2005
20 Feb
'05
10:28 a.m.
Hello, I wonder if there is any means of telling boost::filesystem::directory_iterator to skip broken symlinks. It's sort of an annoyance working with them, since operations like is_directory will throw when invoked on a broken symlink. I am keeping a vector of boost::filesystem::pathS, and as soon as I operate on a broken symlink, an exception will be thrown. I do catch it, but that doesn't really help since the program will return from the method where the exception was thrown. I would find it much more convenient to simply skip these broken files, instead of jumping out of the procedure (IMO it's not even exceptional behavior, dead symlinks are pretty common). Any idea what I can do about this? -- Matthias Kaeppler