diff --git a/simgear/io/HTTPRepository.cxx b/simgear/io/HTTPRepository.cxx index 3354397c..0b3781a9 100644 --- a/simgear/io/HTTPRepository.cxx +++ b/simgear/io/HTTPRepository.cxx @@ -314,7 +314,15 @@ public: simgear::Dir d(absolutePath()); PathList fsChildren = d.children(0); - PathList orphans = d.children(0); + PathList orphans = fsChildren; + + // on Windows, children() will return our .hashes and .dirIndex + // entries; skip them. + orphans.erase(std::remove_if(orphans.begin(), orphans.end(), + [](const SGPath &p) { + return p.file().front() == '.'; + }), + orphans.end()); for (const auto &c : children) { // Check if the file exists