| 52 | } |
| 53 | |
| 54 | std::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 | |
| 82 | std::string getCurrentConfigFileName(void) { |
| 83 | std::string configFile = BZ_CONFIG_FILE_NAME; |
no test coverage detected