diff --git a/src/common/filename.cpp b/src/common/filename.cpp index 674265b462..cc10adf2b3 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -998,7 +998,7 @@ bool wxFileName::IsAbsolute(wxPathFormat format) const bool wxFileName::MakeRelativeTo(const wxString& pathBase, wxPathFormat format) { - wxFileName fnBase(pathBase, format); + wxFileName fnBase = wxFileName::DirName(pathBase, format); // get cwd only once - small time saving wxString cwd = wxGetCwd();