diff --git a/internal/platform/implementation/g3/device_info.h b/internal/platform/implementation/g3/device_info.h index 49ed781c..46ebe45c 100644 --- a/internal/platform/implementation/g3/device_info.h +++ b/internal/platform/implementation/g3/device_info.h @@ -15,7 +15,8 @@ #ifndef PLATFORM_IMPL_G3_DEVICE_INFO_H_ #define PLATFORM_IMPL_G3_DEVICE_INFO_H_ -#include +#include +#include // NOLINT #include #include #include @@ -47,7 +48,12 @@ class DeviceInfo : public api::DeviceInfo { } std::optional GetLocalAppDataPath() const override { - return std::filesystem::temp_directory_path(); + const char* home_dir = getenv("HOME"); + if (home_dir == nullptr) { + return std::filesystem::temp_directory_path(); + } + // Yhis matches the .NET LocalAppData directory on Linux. + return std::filesystem::path(home_dir).append(".local").append("share"); } std::optional GetCommonAppDataPath() const override {