X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7acd36259b464d7139128f2e53acf04b3110eb71..85f138db83939ce7c59a942aaecca7fa98168db3:/src/html/htmprint.cpp diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index 800ca10d66..4e91a6baaf 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -303,7 +303,12 @@ void wxHtmlPrintout::SetHtmlText(const wxString& html, const wxString &basepath, void wxHtmlPrintout::SetHtmlFile(const wxString& htmlfile) { wxFileSystem fs; - wxFSFile *ff = fs.OpenFile(htmlfile); + wxFSFile *ff; + + if (wxFileExists(htmlfile)) + ff = fs.OpenFile(wxFileSystem::FileNameToURL(htmlfile)); + else + ff = fs.OpenFile(htmlfile); if (ff == NULL) {