#include "wx/mimetype.h"
#include "wx/filename.h"
#include "wx/tokenzr.h"
-#include "wx/fileback.h"
+#include "wx/private/fileback.h"
//--------------------------------------------------------------------------------
wxEmptyString,
wxEmptyString,
_T("JPEG image (from fallback)"),
- _T("jpg"), _T("jpeg"), _T("JPG"), _T("JPEG"), NULL),
+ _T("jpg"), _T("jpeg"), _T("JPG"), _T("JPEG"), 0),
wxFileTypeInfo(_T("image/gif"),
wxEmptyString,
wxEmptyString,
_T("GIF image (from fallback)"),
- _T("gif"), _T("GIF"), NULL),
+ _T("gif"), _T("GIF"), 0),
wxFileTypeInfo(_T("image/png"),
wxEmptyString,
wxEmptyString,
_T("PNG image (from fallback)"),
- _T("png"), _T("PNG"), NULL),
+ _T("png"), _T("PNG"), 0),
wxFileTypeInfo(_T("image/bmp"),
wxEmptyString,
wxEmptyString,
_T("windows bitmap image (from fallback)"),
- _T("bmp"), _T("BMP"), NULL),
+ _T("bmp"), _T("BMP"), 0),
wxFileTypeInfo(_T("text/html"),
wxEmptyString,
wxEmptyString,
_T("HTML document (from fallback)"),
- _T("htm"), _T("html"), _T("HTM"), _T("HTML"), NULL),
+ _T("htm"), _T("html"), _T("HTM"), _T("HTML"), 0),
// must terminate the table with this!
wxFileTypeInfo()
};
wxFSFile* wxFileSystem::OpenFile(const wxString& location, int flags)
{
+ if ((flags & wxFS_READ) == 0)
+ return NULL;
+
wxString loc = MakeCorrectPath(location);
unsigned i, ln;
wxChar meta;
meta = 0;
for (i = 0; i < ln; i++)
{
- switch (loc[i])
+ switch ( loc[i].GetValue() )
{
case wxT('/') : case wxT(':') : case wxT('#') :
meta = loc[i];