moved AppendAppName() from MSW to common code; modified it to not double the trailing slash, if any

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30026 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-10-20 00:34:32 +00:00
parent a39490aee6
commit ce336c6d76
4 changed files with 32 additions and 19 deletions

View File

@@ -216,22 +216,6 @@ wxString wxStandardPaths::DoGetDirectory(int csidl)
return dir;
}
/* static */
wxString wxStandardPaths::AppendAppName(const wxString& dir)
{
wxString subdir(dir);
// empty string indicates that an error has occured, don't touch it then
if ( !subdir.empty() )
{
const wxString appname = wxTheApp->GetAppName();
if ( !appname.empty() )
subdir << _T('\\') << appname;
}
return subdir;
}
// ----------------------------------------------------------------------------
// public functions
// ----------------------------------------------------------------------------