MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / getOldConfigFileName

Function getOldConfigFileName

src/clientbase/clientConfig.cpp:54–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54std::string getOldConfigFileName(void) {
55#if !defined(_WIN32)
56
57 std::string name = getConfigDirName();
58 name += "config";
59
60 // add in hostname on UNIX
61 if (getenv("HOST")) {
62 name += ".";
63 name += getenv("HOST");
64 }
65
66 return name;
67
68#elif defined(_WIN32) /* !defined(_WIN32) */
69
70 // get location of personal files from system. this appears to be
71 // the closest thing to a home directory on windows. use root of
72 // C drive as a default in case we can't get the path or it doesn't
73 // exist.
74 std::string oldConfigName = "config.cfg";
75 std::string name = getConfigDirName("2.0");
76 name += oldConfigName;
77 return name;
78
79#endif /* !defined(_WIN32) */
80}
81
82std::string getCurrentConfigFileName(void) {
83 std::string configFile = BZ_CONFIG_FILE_NAME;

Callers 1

findConfigFileFunction · 0.85

Calls 1

getConfigDirNameFunction · 0.85

Tested by

no test coverage detected