diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index a81be7ba77..42b2a66717 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -480,14 +480,15 @@ wxFSFile* wxFileSystem::OpenFile(const wxString& location, int flags) // try relative paths first : if (meta != wxT(':') && !m_Path.empty()) { + const wxString fullloc = m_Path + loc; node = m_Handlers.GetFirst(); while (node) { wxFileSystemHandler *h = (wxFileSystemHandler*) node -> GetData(); - if (h->CanOpen(m_Path + loc)) + if (h->CanOpen(fullloc)) { - s = MakeLocal(h)->OpenFile(*this, m_Path + loc); - if (s) { m_LastName = m_Path + loc; break; } + s = MakeLocal(h)->OpenFile(*this, fullloc); + if (s) { m_LastName = fullloc; break; } } node = node->GetNext(); }