- std::string path = std::string(home) + "/.inspircd";
- if (!mkdir(path.c_str(), 0700) && errno != EEXIST)
- {
- /* Log to ~/.inspircd/ircd.log */
- Config->logpath = path + "/startup.log";
- }
- else
- {
- /* Couldn't make ~/.inspircd directory, log to current dir */
- Config->logpath = "./startup.log";
- printf("\nWARNING: Unable to create directory: %s (%s)\n", path.c_str(), strerror(errno));
- }