]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
updated i18n sample, french translations are now in the "fr" subdirectory.
[wxWidgets.git] / src / common / filefn.cpp
index 9027d5e2dcce0514a636b5bb33d0b9018680ed48..3e299df4f87d5d0ecb0a40c415906e2b5b637712 100644 (file)
@@ -174,7 +174,8 @@ wxString wxPathList::FindValidPath (const wxString& file)
   char buf[_MAXPATHLEN];
   strcpy(buf, wxBuffer);
 
-  char *filename = IsAbsolutePath (buf) ? wxFileNameFromPath (buf) : (char *)buf;
+  char *filename = (char*) NULL; /* shut up buggy egcs warning */
+  filename = IsAbsolutePath (buf) ? wxFileNameFromPath (buf) : (char *)buf;
 
   for (wxNode * node = First (); node; node = node->Next ())
     {
@@ -647,7 +648,9 @@ wxString wxFileNameFromPath (const wxString& path1)
            return wxString(path + 2);
 #endif
     }
-  return wxString("");
+  // Yes, this should return the path, not an empty string, otherwise
+  // we get "thing.txt" -> "".
+  return path1;
 }
 
 // Return just the directory, or NULL if no directory