Skip to content

Commit

Permalink
Telemetry: Open telemetry cfg file in binary mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ptheywood committed Nov 21, 2024
1 parent bb4c106 commit 4516103
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/flamegpu/io/Telemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ std::string Telemetry::getUserId() {

// Check if the file exists
if (std::filesystem::exists(filePath)) {
std::ifstream file(filePath);
std::ifstream file(filePath, std::ios_base::binary);
if (file.is_open()) {
std::string cached_id;
std::getline(file, cached_id); // overwrite existing Id
Expand All @@ -378,7 +378,7 @@ std::string Telemetry::getUserId() {
}
}

std::ofstream file(filePath);
std::ofstream file(filePath, std::ios_base::binary);
if (file.is_open()) {
file << userId;
file.close();
Expand Down

0 comments on commit 4516103

Please sign in to comment.