X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/916af76f40555e9d2548a1538e2a5563222ea373..bf0e8244d985e240997590fbf41e37310c9abbd7:/src/common/filesys.cpp diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index c045f5e798..19675f7996 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -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];