From: Václav Slavík Date: Fri, 13 Mar 2009 15:04:05 +0000 (+0000) Subject: return URLs, not filenames, from wxFileSystem::FindFirst/FindNext() for the file... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8e63b7b8ea9cb46870ab4d26e29c3d4c3b3b99a8 return URLs, not filenames, from wxFileSystem::FindFirst/FindNext() for the file: protocol git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index 0eb5d8ef5e..003ff698b8 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -274,12 +274,18 @@ wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& wxString wxLocalFSHandler::FindFirst(const wxString& spec, int flags) { wxFileName fn = wxFileSystem::URLToFileName(GetRightLocation(spec)); - return wxFindFirstFile(ms_root + fn.GetFullPath(), flags); + const wxString found = wxFindFirstFile(ms_root + fn.GetFullPath(), flags); + if ( found.empty() ) + return found; + return wxFileSystem::FileNameToURL(found); } wxString wxLocalFSHandler::FindNext() { - return wxFindNextFile(); + const wxString found = wxFindNextFile(); + if ( found.empty() ) + return found; + return wxFileSystem::FileNameToURL(found); }