Skip to content
Permalink
Browse files

pcsx2: use PCSX2 uppercase for XDG_HOME_CONFIG default value

This way it will always be the same.

Fix issues #381

Note: potentially we might need to move your previous directory.
mv $HOME/.config/pcsx2 $HOME/.config/PCSX2
  • Loading branch information...
gregory38 committed Dec 8, 2014
1 parent 5ce4b85 commit 87f1e8f77d5100f15839f042a9d32f2a8f1b8653
Showing with 3 additions and 2 deletions.
  1. +3 −2 pcsx2/gui/AppMain.cpp
@@ -370,17 +370,18 @@ class Pcsx2StandardPaths : public wxStandardPaths
// Note: GetUserLocalDataDir() on linux return $HOME/.pcsx2 unfortunately it does not follow the XDG standard
// So we re-implement it, to follow the standard.
wxDirName user_local_dir;
wxDirName default_config_dir = (wxDirName)Path::Combine( L".config", pxGetAppName() );
wxString xdg_home_value;
if( wxGetEnv(L"XDG_CONFIG_HOME", &xdg_home_value) ) {
if ( xdg_home_value.IsEmpty() ) {
// variable exist but it is empty. So use the default value
user_local_dir = (wxDirName)Path::Combine( GetUserConfigDir() , wxDirName( L".config/pcsx2" ));
user_local_dir = (wxDirName)Path::Combine( GetUserConfigDir() , default_config_dir);
} else {
user_local_dir = (wxDirName)Path::Combine( xdg_home_value, pxGetAppName());
}
} else {
// variable do not exist
user_local_dir = (wxDirName)Path::Combine( GetUserConfigDir() , wxDirName( L".config/pcsx2" ));
user_local_dir = (wxDirName)Path::Combine( GetUserConfigDir() , default_config_dir);
}

cache_dir = user_local_dir.ToString();

1 comment on commit 87f1e8f

@rffontenelle

This comment has been minimized.

Copy link
Contributor

commented on 87f1e8f Dec 9, 2014

FWIW, a workaround for this situation is to symlink ~/PCSX2 to ~/.config/pcsx2

Please sign in to comment.
You can’t perform that action at this time.