mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Workaround for "backward reference detected" issue
PiperOrigin-RevId: 547646854
This commit is contained in:
committed by
Copybara-Service
parent
85a01e9636
commit
b113f5550d
@@ -223,6 +223,7 @@ cc_library(
|
||||
"//fastpair:__subpackages__",
|
||||
"//internal/platform/implementation:__subpackages__",
|
||||
"//presence:__subpackages__",
|
||||
"//third_party/nearby/sharing:__subpackages__",
|
||||
],
|
||||
deps = [
|
||||
":base",
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "nlohmann/json.hpp"
|
||||
#include "nlohmann/json_fwd.hpp"
|
||||
#include "internal/platform/implementation/g3/device_info.h"
|
||||
#include "internal/platform/implementation/g3/preferences_repository.h"
|
||||
#include "internal/platform/logging.h"
|
||||
|
||||
@@ -35,9 +36,9 @@ using json = ::nlohmann::json;
|
||||
|
||||
PreferencesManager::PreferencesManager(absl::string_view file_path)
|
||||
: api::PreferencesManager(file_path) {
|
||||
auto device_info = std::make_unique<g3::DeviceInfo>();
|
||||
std::optional<std::filesystem::path> path =
|
||||
nearby::api::ImplementationPlatform::CreateDeviceInfo()
|
||||
->GetLocalAppDataPath();
|
||||
device_info->GetLocalAppDataPath();
|
||||
if (!path.has_value()) {
|
||||
path = std::filesystem::temp_directory_path();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user