Skip to content

Commit

Permalink
Rename the configuration folder to be in lowercase on Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arignir committed Mar 8, 2024
1 parent c86926a commit eb2aea1
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions source/app/path.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
#include "app/app.h"
#include "compat.h"

/*
** Capitalize the name of the Hades folders on Windows and MacOS.
*/
#if (defined (_WIN32) && !defined (__CYGWIN__)) || defined(__APPLE__)
#define HADES_FOLDER_NAME "Hades"
#else
#define HADES_FOLDER_NAME "hades"
#endif

/*
** Return the platform-dependent configuration directory or NULL
** if the system doesn't have one.
Expand Down Expand Up @@ -102,7 +111,7 @@ app_paths_update(
if (sys_config_dir && hs_fexists(sys_config_dir)) {
char *hades_config_dir;

hades_config_dir = hs_format("%s/Hades", sys_config_dir);
hades_config_dir = hs_format("%s/%s", sys_config_dir, HADES_FOLDER_NAME);

if (!hs_fexists(hades_config_dir)) {
hs_mkdir(hades_config_dir);
Expand All @@ -115,7 +124,7 @@ app_paths_update(
}

if (sys_pictures_dir && hs_fexists(sys_pictures_dir)) {
app->file.sys_pictures_dir_path = hs_format("%s/Hades", sys_pictures_dir);
app->file.sys_pictures_dir_path = hs_format("%s/%s", sys_pictures_dir, HADES_FOLDER_NAME);
free(sys_pictures_dir);
}
}
Expand Down

0 comments on commit eb2aea1

Please sign in to comment.