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
|
wxString wxStandardPaths::GetUserDir(Dir userDir) const
|
||||||
{
|
{
|
||||||
switch ( GetFileLayout() )
|
// 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)
|
||||||
case FileLayout_Classic:
|
// hadn't been called: we're not bound by any backwards compatibility
|
||||||
// Fall back to the base class below.
|
// considerations as there can't be any pre-existing config or data files
|
||||||
break;
|
// 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;
|
wxLogNull logNull;
|
||||||
wxString homeDir = wxFileName::GetHomeDir();
|
wxString homeDir = wxFileName::GetHomeDir();
|
||||||
if (userDir == Dir_Cache)
|
if (userDir == Dir_Cache)
|
||||||
@@ -324,9 +323,6 @@ wxString wxStandardPaths::GetUserDir(Dir userDir) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return wxStandardPathsBase::GetUserDir(userDir);
|
return wxStandardPathsBase::GetUserDir(userDir);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user