]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
wxTinderbox build fix (!PCH support).
[wxWidgets.git] / src / common / filefn.cpp
index dabc946ebf50984b0361dd9cf2c7b6f0147a15ed..bb97970acc557d3dd62952f7a0fce0b43236f528 100644 (file)
@@ -242,8 +242,7 @@ bool wxPathList::Member (const wxString& path)
 
 wxString wxPathList::FindValidPath (const wxString& file)
 {
-  if (wxFileExists (wxExpandPath(wxFileFunctionsBuffer, file)))
-    return wxString(wxFileFunctionsBuffer);
+  wxExpandPath(wxFileFunctionsBuffer, file);
 
   wxChar buf[_MAXPATHLEN];
   wxStrcpy(buf, wxFileFunctionsBuffer);
@@ -252,7 +251,7 @@ wxString wxPathList::FindValidPath (const wxString& file)
 
   for (wxStringList::compatibility_iterator node = GetFirst(); node; node = node->GetNext())
     {
-      const wxChar *path = node->GetData();
+      const wxString path(node->GetData());
       wxStrcpy (wxFileFunctionsBuffer, path);
       wxChar ch = wxFileFunctionsBuffer[wxStrlen(wxFileFunctionsBuffer)-1];
       if (ch != wxT('\\') && ch != wxT('/'))