X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ef0e85f3f19bb66450d77b98606a315b3f1897a2..feef1ecf072d77d9b5d66a347891efb9c5b16bb6:/src/common/sckfile.cpp diff --git a/src/common/sckfile.cpp b/src/common/sckfile.cpp index 11134b8373..6118f10c01 100644 --- a/src/common/sckfile.cpp +++ b/src/common/sckfile.cpp @@ -6,9 +6,9 @@ // Created: 20/07/97 // RCS-ID: $Id$ // Copyright: (c) 1997, 1998 Guilhem Lavaux -// Licence: wxWindows license +// 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