X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/55d99c7a77789ff4904bf96eddca3715eb5af9b9..301deecc27a700e5432f8923be63ec71a79b8a52:/src/common/sckfile.cpp diff --git a/src/common/sckfile.cpp b/src/common/sckfile.cpp index a36b7756ce..6118f10c01 100644 --- a/src/common/sckfile.cpp +++ b/src/common/sckfile.cpp @@ -8,7 +8,7 @@ // Copyright: (c) 1997, 1998 Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "sckfile.h" #endif @@ -43,7 +43,13 @@ wxFileProto::~wxFileProto() wxInputStream *wxFileProto::GetInputStream(const wxString& path) { - return new wxFileInputStream(path); + wxFileInputStream* retval = new wxFileInputStream(wxURL::ConvertFromURI(path)); + if (retval->Ok()) { + return retval; + } else { + delete retval; + return 0; + } } #endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE