X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b8b37cedd39bae3a3653003a7f8ae5fecf4df78f..4fc3eebc017183cb8cc2c4400227d05b4eb16676:/src/common/filesys.cpp diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index 5e99f9787a..425be7057c 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -20,10 +20,10 @@ #ifndef WX_PRECOMP #include "wx/log.h" + #include "wx/module.h" #endif #include "wx/wfstream.h" -#include "wx/module.h" #include "wx/mimetype.h" #include "wx/filename.h" #include "wx/tokenzr.h" @@ -482,7 +482,9 @@ bool wxFileSystem::FindFileInPath(wxString *pStr, void wxFileSystem::AddHandler(wxFileSystemHandler *handler) { - m_Handlers.Append(handler); + // prepend the handler to the beginning of the list because handlers added + // last should have the highest priority to allow overriding them + m_Handlers.Insert((size_t)0, handler); } bool wxFileSystem::HasHandlerForPath(const wxString &location)