From 97750eb282d3aa6197e9f2ecc9eb6bcd224c0863 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 15 Apr 2021 18:20:32 +0100 Subject: [PATCH] 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. --- src/common/filesys.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index 2e2337a198..a81be7ba77 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -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)