| 316 | } |
| 317 | |
| 318 | static void saveIndex(const IndexHeader& header) |
| 319 | { |
| 320 | Core::Timer saveTimer; |
| 321 | |
| 322 | FileStream stream; |
| 323 | const auto indexPath = Environment::getPathNoWarning(Environment::PathId::plugin1); |
| 324 | stream.open(indexPath, StreamMode::write); |
| 325 | if (!stream.isOpen()) |
| 326 | { |
| 327 | Logging::error("Unable to save object index."); |
| 328 | return; |
| 329 | } |
| 330 | serialiseIndex(stream, header, _installedObjectList); |
| 331 | |
| 332 | Logging::verbose("Saved object index in {} milliseconds.", saveTimer.elapsed()); |
| 333 | } |
| 334 | |
| 335 | static ObjectIndexEntry createPartialNewEntry(const ObjectHeader& objHeader, const fs::path filepath) |
| 336 | { |
no test coverage detected