Then... why don't you? :)
if(recursively && !loadDirectory((it->path() / s).native(), npc, recursively))
By now it probably makes sense to
- introduce a variable for
it->path() / s
- read the documentation for Boost Filesystem
The code suggests you are trying traverse a filesystem tree recursively. Have you looked atboost::recursive_directory_iterator
?