fix: Replace old defaults path system with a new one

#1767
This commit is contained in:
WerWolv
2024-06-22 10:44:55 +02:00
parent beef0fff33
commit b60a262b58
41 changed files with 461 additions and 356 deletions

View File

@@ -3,6 +3,7 @@
#include <hex/helpers/http_requests.hpp>
#include <hex/helpers/utils.hpp>
#include <hex/helpers/default_paths.hpp>
using namespace std::literals::string_literals;
@@ -46,7 +47,7 @@ std::optional<std::fs::path> downloadUpdate(const std::string &url) {
// Loop over all available paths
wolv::io::File file;
for (const auto &path : hex::fs::getDefaultPaths(hex::fs::ImHexPath::Config)) {
for (const auto &path : hex::paths::Config.write()) {
// Remove any existing update files
wolv::io::fs::remove(path / UpdateFileName);