Revert incompatible change to Unix wxStandardPaths::GetUserDir()
There is no reason to break the behaviour of the existing code, which doesn't call SetFileLayout(FileLayout_XDG), by not returning the correct directories from GetUserDir(Dir_Downloads) and similar any longer.
This commit is contained in:
@@ -251,14 +251,13 @@ wxStandardPaths::GetLocalizedResourcesDir(const wxString& lang,
|
||||
|
||||
wxString wxStandardPaths::GetUserDir(Dir userDir) const
|
||||
{
|
||||
switch ( GetFileLayout() )
|
||||
{
|
||||
case FileLayout_Classic:
|
||||
// Fall back to the base class below.
|
||||
break;
|
||||
// Note that we do not use the file layout here because there is no reason
|
||||
// not to respect the XDG convention even if SetFileLayout(FileLayout_XDG)
|
||||
// hadn't been called: we're not bound by any backwards compatibility
|
||||
// considerations as there can't be any pre-existing config or data files
|
||||
// in the home directory that wouldn't be found any longer after updating
|
||||
// the version of wxWidgets used by the application.
|
||||
|
||||
case FileLayout_XDG:
|
||||
{
|
||||
wxLogNull logNull;
|
||||
wxString homeDir = wxFileName::GetHomeDir();
|
||||
if (userDir == Dir_Cache)
|
||||
@@ -324,9 +323,6 @@ wxString wxStandardPaths::GetUserDir(Dir userDir) const
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return wxStandardPathsBase::GetUserDir(userDir);
|
||||
}
|
||||
|
Reference in New Issue
Block a user