ConfigModule::ConfigModule() { ResourceFinder rf; rf.findConfigurationFile(); config_filename[0] = 0; // Search the configuration file from first to last path while (const char* path = rf.next()) { if (exists(path)) { ustrcpy(config_filename, path); break; } } // If the file wasn't found, we will create configuration file // in the first path if (config_filename[0] == 0 && rf.first()) ustrcpy(config_filename, rf.first()); override_config_file(config_filename); }