| 44 | |
| 45 | #if !(defined(__APPLE__) && defined(__MACH__)) |
| 46 | static fs::path getHomeDirectory() |
| 47 | { |
| 48 | auto pw = getpwuid(getuid()); |
| 49 | if (pw != nullptr) |
| 50 | { |
| 51 | return pw->pw_dir; |
| 52 | } |
| 53 | else |
| 54 | { |
| 55 | return getEnvironmentVariable("HOME"); |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | fs::path getUserDirectory() |
| 60 | { |
no test coverage detected