From e7a1802bee3b87f4d33541cba194ae7258b5a566 Mon Sep 17 00:00:00 2001 From: orignal Date: Sat, 7 Nov 2026 18:01:12 -0500 Subject: [PATCH] fixed windows build --- libi2pd/NetDb.cpp | 2 +- libi2pd/Profiling.cpp | 8 ++++---- libi2pd_client/AddressBook.cpp | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libi2pd/NetDb.cpp b/libi2pd/NetDb.cpp index 93043557..2f807323 100644 --- a/libi2pd/NetDb.cpp +++ b/libi2pd/NetDb.cpp @@ -548,7 +548,7 @@ namespace data else { LogPrint(eLogWarning, "NetDb: RI from ", p, " is invalid or too old. Delete"); - i2p::fs::Remove(p); + i2p::fs::Remove(p.string ()); // TODO: } return true; } diff --git a/libi2pd/Profiling.cpp b/libi2pd/Profiling.cpp index 54f8c0de..9cd5c81a 100644 --- a/libi2pd/Profiling.cpp +++ b/libi2pd/Profiling.cpp @@ -72,7 +72,7 @@ namespace data // save to file std::string ident = identHash.ToBase64 (); - std::string path = g_ProfilesStorage.Path(ident); + std::string path = g_ProfilesStorage.Path(ident).string (); try { @@ -89,7 +89,7 @@ namespace data { m_IsUpdated = false; std::string ident = identHash.ToBase64 (); - std::string path = g_ProfilesStorage.Path(ident); + std::string path = g_ProfilesStorage.Path(ident).string (); boost::property_tree::ptree pt; if (!i2p::fs::Exists(path)) @@ -358,7 +358,7 @@ namespace data std::time_t now = std::time(nullptr); for (const auto& path: files) { - if (stat(path.c_str(), &st) != 0) + if (stat(path.string ().c_str(), &st) != 0) { LogPrint(eLogWarning, "Profiling: Can't stat(): ", path); continue; @@ -366,7 +366,7 @@ namespace data if (now - st.st_mtime >= PEER_PROFILE_EXPIRATION_TIMEOUT) { LogPrint(eLogDebug, "Profiling: Removing expired peer profile: ", path); - i2p::fs::Remove(path); + i2p::fs::Remove(path.string ()); } } } diff --git a/libi2pd_client/AddressBook.cpp b/libi2pd_client/AddressBook.cpp index c5424775..d71043ec 100644 --- a/libi2pd_client/AddressBook.cpp +++ b/libi2pd_client/AddressBook.cpp @@ -81,8 +81,8 @@ namespace client { // init ETags etagsPath = i2p::fs::StorageRootPath (storage, "etags"); - if (!i2p::fs::Exists (etagsPath)) - i2p::fs::CreateDirectory (etagsPath); + if (!i2p::fs::Exists (etagsPath.string ())) + i2p::fs::CreateDirectory (etagsPath.string ()); // init address files indexPath = i2p::fs::StorageRootPath (storage, "addresses.csv"); localPath = i2p::fs::StorageRootPath (storage, "local.csv"); @@ -109,7 +109,7 @@ namespace client LogPrint(eLogDebug, "Addressbook: Persistence is disabled"); return nullptr; } - std::string filename = storage.Path(ident.ToBase32()); + auto filename = storage.Path(ident.ToBase32()); std::ifstream f(filename, std::ifstream::binary); if (!f.is_open ()) { @@ -155,7 +155,7 @@ namespace client } if (m_IsPersist && !buf.empty ()) { - std::string path = storage.Path(address->GetIdentHash().ToBase32()); + auto path = storage.Path(address->GetIdentHash().ToBase32()); std::ofstream f (path, std::ofstream::binary | std::ofstream::out); if (!f.is_open ()) {