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

Function validateLocoInstallPath

src/OpenLoco/src/Environment.cpp:32–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30#endif
31
32 static bool validateLocoInstallPath(const fs::path& path)
33 {
34 if (path.empty())
35 {
36 return false;
37 }
38 else
39 {
40 auto g1Path = path / getSubPath(PathId::g1);
41 bool g1Exists = fs::exists(g1Path);
42#ifndef _WIN32
43 if (!g1Exists)
44 {
45 g1Path = findSimilarFile(g1Path);
46 g1Exists = !g1Path.empty();
47 }
48#endif
49 return g1Exists;
50 }
51 }
52
53 static fs::path autoDetectLocoInstallPath()
54 {

Callers 2

resolveLocoInstallPathFunction · 0.85

Calls 3

getSubPathFunction · 0.85
findSimilarFileFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected