]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filesys.cpp
Compilo.
[wxWidgets.git] / src / common / filesys.cpp
index 5e99f9787a01d6c3a926876059f13a4bff1fe2cd..425be7057ce7a6ea5a726925442f2c4ba105d649 100644 (file)
 
 #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)