]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sckfile.cpp
removing unreached code (overriden)
[wxWidgets.git] / src / common / sckfile.cpp
index a36b7756ce6feca8d7130a9d1a777106ce65381f..6118f10c01a4495638041caf050f6f60881d2eee 100644 (file)
@@ -8,7 +8,7 @@
 // Copyright:   (c) 1997, 1998 Guilhem Lavaux
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) 1997, 1998 Guilhem Lavaux
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "sckfile.h"
 #endif
 
 #pragma implementation "sckfile.h"
 #endif
 
@@ -43,7 +43,13 @@ wxFileProto::~wxFileProto()
 
 wxInputStream *wxFileProto::GetInputStream(const wxString& path)
 {
 
 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
 }
 
 #endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE