- [CHG] Ara en Linux la configuració se guarda en " ~/.config/thepool/config.txt"
- [FIX] Solventada explosió en pantalla de gameover per un dangling pointer. Aplicades medides similars en catslife i ingame.
This commit is contained in:
@@ -341,7 +341,19 @@ namespace file
|
||||
#elif __linux__
|
||||
struct passwd *pw = getpwuid(getuid());
|
||||
const char *homedir = pw->pw_dir;
|
||||
config_folder = std::string(homedir) + "/." + foldername;
|
||||
config_folder = std::string(homedir) + "/.config/" + foldername;
|
||||
|
||||
{
|
||||
// Intenta crear ".config", per si no existeix
|
||||
std::string config_base_folder = std::string(homedir) + "/.config";
|
||||
int ret = mkdir(config_base_folder.c_str(), S_IRWXU);
|
||||
if (ret == -1 && errno != EEXIST)
|
||||
{
|
||||
printf("ERROR CREATING CONFIG BASE FOLDER.");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
struct stat st = {0};
|
||||
|
||||
Reference in New Issue
Block a user