Add convenient wxFileName::GetAbsolutePath() wrapper and use it
This wrapper simply combines the calls to MakeAbsolute() and GetFullPath(), but using it results in shorter and more clear code, so it seems to be worth having.
This commit is contained in:
@@ -748,9 +748,7 @@ void WebFrame::OnLoadScheme(wxCommandEvent& WXUNUSED(evt))
|
||||
pathlist.Add("../help");
|
||||
pathlist.Add("../../../samples/help");
|
||||
|
||||
wxFileName helpfile(pathlist.FindValidPath("doc.zip"));
|
||||
helpfile.MakeAbsolute();
|
||||
wxString path = helpfile.GetFullPath();
|
||||
wxString path = wxFileName(pathlist.FindValidPath("doc.zip")).GetAbsolutePath();
|
||||
//Under MSW we need to flip the slashes
|
||||
path.Replace("\\", "/");
|
||||
path = "wxfs:///" + path + ";protocol=zip/doc.htm";
|
||||
|
Reference in New Issue
Block a user