Browse Source
[logging] USER null fallback
Signed-off-by: crueter <crueter@eden-emu.dev>
pull/3021/head
crueter
3 months ago
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
1 changed files with
4 additions and
0 deletions
-
src/common/logging/backend.cpp
|
|
@ -115,6 +115,10 @@ public: |
|
|
auto* s = getenv("USER"); |
|
|
auto* s = getenv("USER"); |
|
|
if (s == nullptr) |
|
|
if (s == nullptr) |
|
|
s = getenv("USERNAME"); |
|
|
s = getenv("USERNAME"); |
|
|
|
|
|
|
|
|
|
|
|
if (s == nullptr) |
|
|
|
|
|
return ""; |
|
|
|
|
|
|
|
|
return std::string{s}; |
|
|
return std::string{s}; |
|
|
}(); |
|
|
}(); |
|
|
if (!username.empty()) |
|
|
if (!username.empty()) |
|
|
|