--- a/intern/ghost/intern/GHOST_SystemPathsX11.cpp +++ b/intern/ghost/intern/GHOST_SystemPathsX11.cpp @@ -42,6 +42,7 @@ #include // for fprintf only #include // for exit +#include // for strncat #ifdef PREFIX static const char *static_path= PREFIX "/share" ; @@ -65,7 +66,13 @@ const GHOST_TUns8* GHOST_SystemPathsX11::getUserDir() const { - return (const GHOST_TUns8 *)getenv("HOME"); + static const char *xdg_config_home = getenv("XDG_CONFIG_HOME"); + static const char *xdg_config_fallback = strncat(getenv("HOME"),"/.config",8); + + if (xdg_config_home) + return (const GHOST_TUns8 *)xdg_config_home; + else + return (const GHOST_TUns8 *)xdg_config_fallback; } const GHOST_TUns8* GHOST_SystemPathsX11::getBinaryDir() const --- a/source/blender/blenlib/BLI_path_util.h +++ b/source/blender/blenlib/BLI_path_util.h @@ -85,7 +85,7 @@ #define BLENDER_USER_FORMAT "%s/Blender/%s" #define BLENDER_SYSTEM_FORMAT "%s/Blender/%s" #else -#define BLENDER_USER_FORMAT "%s/.blender/%s" +#define BLENDER_USER_FORMAT "%s/blender/%s" #define BLENDER_SYSTEM_FORMAT "%s/blender/%s" #endif