X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b147f2e19c90ea74a4f96260ef8954a9bfbe2f1..b53aea81d2e102224b452ef5bf7aee1132f37c6f:/src/common/stdpbase.cpp diff --git a/src/common/stdpbase.cpp b/src/common/stdpbase.cpp index 04cebb8587..6eaaeb29ec 100644 --- a/src/common/stdpbase.cpp +++ b/src/common/stdpbase.cpp @@ -106,6 +106,14 @@ wxString wxStandardPathsBase::GetDocumentsDir() const return wxFileName::GetHomeDir(); } +wxString wxStandardPathsBase::GetAppDocumentsDir() const +{ + const wxString docsDir = GetDocumentsDir(); + wxString appDocsDir = AppendAppInfo(docsDir); + + return wxDirExists(appDocsDir) ? appDocsDir : docsDir; +} + // return the temporary directory for the current user wxString wxStandardPathsBase::GetTempDir() const { @@ -113,7 +121,9 @@ wxString wxStandardPathsBase::GetTempDir() const } /* static */ -wxString wxStandardPathsBase::AppendPathComponent(const wxString& dir, const wxString& component) +wxString +wxStandardPathsBase::AppendPathComponent(const wxString& dir, + const wxString& component) { wxString subdir(dir);