]> git.saurik.com Git - wxWidgets.git/commitdiff
return URLs, not filenames, from wxFileSystem::FindFirst/FindNext() for the file...
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 13 Mar 2009 15:04:05 +0000 (15:04 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 13 Mar 2009 15:04:05 +0000 (15:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/filesys.cpp

index 0eb5d8ef5eac764fef571bc47fbe47dbfe2aa41f..003ff698b8295377040dae665904ac1b755d7675 100644 (file)
@@ -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);
 }