Don't try relative paths in wxFileSystem if current path is empty

This seems redundant, as the loop is the same as the one just below it
which is executed in any case if this one doesn't find anything.
This commit is contained in:
Vadim Zeitlin
2021-04-15 18:20:32 +01:00
parent ebedd023f5
commit 97750eb282

View File

@@ -478,7 +478,7 @@ wxFSFile* wxFileSystem::OpenFile(const wxString& location, int flags)
m_LastName.clear();
// try relative paths first :
if (meta != wxT(':'))
if (meta != wxT(':') && !m_Path.empty())
{
node = m_Handlers.GetFirst();
while (node)