]> git.saurik.com Git - wxWidgets.git/commitdiff
In GetPath(), don't append separator if there's already one at the end
authorJulian Smart <julian@anthemion.co.uk>
Thu, 25 Apr 2002 10:25:45 +0000 (10:25 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 25 Apr 2002 10:25:45 +0000 (10:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/filename.cpp

index a7409aa0c89f90c004a3ffc97040806c2031bce9..db586b2f6a783e7f33f89de2b82d739f8aaea22a 100644 (file)
@@ -1220,7 +1220,7 @@ wxString wxFileName::GetPath( int flags, wxPathFormat format ) const
         }
     }
 
-    if ( (flags & wxPATH_GET_SEPARATOR) && !fullpath.empty() )
+    if ( (flags & wxPATH_GET_SEPARATOR) && !fullpath.empty() && fullpath.Last() != wxFILE_SEP_PATH)
     {
         fullpath += GetPathSeparator(format);
     }