X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/52ad298e6600c75c417f94d23eef72ad4d78f133..bf0e8244d985e240997590fbf41e37310c9abbd7:/src/common/filesys.cpp diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index 43c1ff93ae..19675f7996 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -27,7 +27,7 @@ #include "wx/mimetype.h" #include "wx/filename.h" #include "wx/tokenzr.h" -#include "wx/fileback.h" +#include "wx/private/fileback.h" //-------------------------------------------------------------------------------- @@ -385,6 +385,9 @@ wxFileSystemHandler *wxFileSystem::MakeLocal(wxFileSystemHandler *h) wxFSFile* wxFileSystem::OpenFile(const wxString& location, int flags) { + if ((flags & wxFS_READ) == 0) + return NULL; + wxString loc = MakeCorrectPath(location); unsigned i, ln; wxChar meta; @@ -395,7 +398,7 @@ wxFSFile* wxFileSystem::OpenFile(const wxString& location, int flags) meta = 0; for (i = 0; i < ln; i++) { - switch (loc[i]) + switch ( loc[i].GetValue() ) { case wxT('/') : case wxT(':') : case wxT('#') : meta = loc[i];