X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a62848fdba49396eba4f52c037d2dc82130274b4..52069700e7f9c4cc1fc4379306e9f763c5b83073:/src/common/fs_inet.cpp diff --git a/src/common/fs_inet.cpp b/src/common/fs_inet.cpp index 7e9ce0fe02..f2add64583 100644 --- a/src/common/fs_inet.cpp +++ b/src/common/fs_inet.cpp @@ -84,13 +84,14 @@ static wxString StripProtocolAnchor(const wxString& location) bool wxInternetFSHandler::CanOpen(const wxString& location) { +#if wxUSE_URL wxString p = GetProtocol(location); if ((p == wxT("http")) || (p == wxT("ftp"))) { wxURL url(p + wxT(":") + StripProtocolAnchor(location)); return (url.GetError() == wxURL_NOERR); } - +#endif return false; } @@ -98,6 +99,9 @@ bool wxInternetFSHandler::CanOpen(const wxString& location) wxFSFile* wxInternetFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& location) { +#if !wxUSE_URL + return NULL; +#else wxString right = GetProtocol(location) + wxT(":") + StripProtocolAnchor(location); @@ -130,6 +134,7 @@ wxFSFile* wxInternetFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), } return (wxFSFile*) NULL; // incorrect URL +#endif }