X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..301deecc27a700e5432f8923be63ec71a79b8a52:/src/common/sckfile.cpp?ds=sidebyside diff --git a/src/common/sckfile.cpp b/src/common/sckfile.cpp index e48f33693f..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 @@ -23,7 +23,7 @@ #include "wx/defs.h" #endif -#if wxUSE_STREAMS +#if wxUSE_STREAMS && wxUSE_PROTOCOL_FILE #include #include "wx/wfstream.h" @@ -43,8 +43,14 @@ 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 +#endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE