From 25db1b74f1264c27bbf2e5fcc9f3a19ccc56d5fc Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 3 Oct 2001 17:12:33 +0000 Subject: [PATCH] Made mkdir more UNC path-friendly git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/filename.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/filename.cpp b/src/common/filename.cpp index b9679a11a3..d30a7f8ba1 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -70,18 +70,18 @@ void wxFileName::Assign( const wxString& path, { wxStringTokenizer tn(path, GetPathSeparators(format), wxTOKEN_RET_EMPTY_ALL); - bool first = TRUE; + int i = 0; m_dirs.Clear(); while ( tn.HasMoreTokens() ) { wxString token = tn.GetNextToken(); - // If the path starts with a slash, we need the first - // dir entry to be an empty for later reassembly. - if (first || !token.IsEmpty()) + // If the path starts with a slash (or two for a network path), + // we need the first dir entry to be an empty for later reassembly. + if ((i < 2) || !token.IsEmpty()) m_dirs.Add( token ); - first = FALSE; + i ++; } m_ext = ext; -- 2.47.2