From dcf0fce44b34522ee1d3bef16a42b36cfd3c4bde Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 14 Jul 2001 14:29:09 +0000 Subject: [PATCH] Restored wxFileName::GetFullPath() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/filename.cpp | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) 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) -- 2.47.2