| 74 | } |
| 75 | |
| 76 | void AppData::removeNonExistingPaths(std::vector<std::filesystem::path>& paths) |
| 77 | { |
| 78 | paths.erase(std::remove_if(paths.begin(), paths.end(), [](const auto& path) { |
| 79 | // Remove path if file does not exist. |
| 80 | if (!std::filesystem::exists(path)) return true; |
| 81 | auto canonicalPath = std::filesystem::canonical(path); |
| 82 | // Remove path if not in canonical form. |
| 83 | return path != canonicalPath; |
| 84 | }), paths.end()); |
| 85 | } |
| 86 | |
| 87 | void AppData::save() |
| 88 | { |