]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
Worked around static box opaqueness problem on WinCE by setting the
[wxWidgets.git] / src / common / filefn.cpp
index 3c0a2f5285684c9b2136cd1434666bbc9bde8844..99a1f807a66edba45b15354dd0d061389cbfc07f 100644 (file)
@@ -354,7 +354,7 @@ wxString wxPathList::FindValidPath (const wxString& file)
 wxString wxPathList::FindAbsoluteValidPath (const wxString& file)
 {
     wxString f = FindValidPath(file);
-    if ( wxIsAbsolutePath(f) )
+    if ( f.empty() || wxIsAbsolutePath(f) )
         return f;
 
     wxString buf;
@@ -879,6 +879,9 @@ wxString wxPathOnly (const wxString& path)
             // Unix like or Windows
             if (path[i] == wxT('/') || path[i] == wxT('\\'))
             {
+                // Don't return an empty string
+                if (i == 0)
+                    i ++;
                 buf[i] = 0;
                 return wxString(buf);
             }