]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't return wxEmptyString for e.g. wxPathOnly("\file.txt")
authorJulian Smart <julian@anthemion.co.uk>
Mon, 26 Jul 2004 20:55:59 +0000 (20:55 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 26 Jul 2004 20:55:59 +0000 (20:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/filefn.cpp

index bff8bd1bc717e56667ef029cfce3367b6ee45db0..99a1f807a66edba45b15354dd0d061389cbfc07f 100644 (file)
@@ -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);
             }