X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8cb172b4f12fae80b06d5936108a1bc7f2521674..aba4387c4c71fb812c6a07a7abb495606c5ef4af:/src/common/filename.cpp diff --git a/src/common/filename.cpp b/src/common/filename.cpp index d3ee13116e..d8446148ac 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -530,8 +530,44 @@ wxString wxFileName::GetPath( bool add_separator, wxPathFormat format ) const wxString wxFileName::GetFullPath( wxPathFormat format ) const { - (void)format; - return GetPathWithSep() + GetFullName(); + format = GetFormat( format ); + + wxString ret; + if (format == wxPATH_DOS) + { + for (size_t i = 0; i < m_dirs.GetCount(); i++) + { + ret += m_dirs[i]; + ret += '\\'; + } + } + else + if (format == wxPATH_UNIX) + { + for (size_t i = 0; i < m_dirs.GetCount(); i++) + { + ret += m_dirs[i]; + ret += '/'; + } + } + else + { + for (size_t i = 0; i < m_dirs.GetCount(); i++) + { + ret += m_dirs[i]; + ret += ':'; + } + } + + ret += m_name; + + if (!m_ext.IsEmpty()) + { + ret += '.'; + ret += m_ext; + } + + return ret; } // Return the short form of the path (returns identity on non-Windows platforms)