To avoid showing users errors like:
recursive_directory_iterator::operator++: Access is denied.
And show something like this:
Failed to recursively iterate over "/home/elsid/.local/share/openmw/test_data"
when incrementing to the next item from
"/home/elsid/.local/share/openmw/test_data/permission_denied": Permission denied
It should be initialize for each created archive anyway. There is no good reason
to have additional complexity for lazy initialization. And it helps to catch
problems with specific directory when it's added to the VFS not when all are
added and index is built.
When there is no cache, we can fill the `out`
variable as we create it, instead of creating the
cache, and then iterating it to fill `out`.
Thanks to @cemoc for the help!