MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / getHomeDirectory

Function getHomeDirectory

src/Platform/src/Platform.Posix.cpp:46–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

getUserDirectoryFunction · 0.85

Calls 1

getEnvironmentVariableFunction · 0.70

Tested by

no test coverage detected