From 77fe02a8e9cccb6d159cccd37e3a24349370e515 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 26 Mar 2001 15:51:02 +0000 Subject: [PATCH] Bug fix to Mkdirs and GetLongPath git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/filename.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/filename.cpp b/src/common/filename.cpp index 610a7c2993..cf4867b024 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -215,6 +215,7 @@ bool wxFileName::Mkdir( const wxString &dir, int perm, bool full ) { wxFileName filename(dir); wxArrayString dirs = filename.GetDirs(); + dirs.Add(filename.GetName()); size_t count = dirs.GetCount(); size_t i; @@ -620,7 +621,10 @@ wxString wxFileName::GetLongPath() const HANDLE hFind; pathOut = wxEmptyString; - size_t count = m_dirs.GetCount(); + wxArrayString dirs = GetDirs(); + dirs.Add(GetName()); + + size_t count = dirs.GetCount(); size_t i; wxString tmpPath; @@ -628,7 +632,7 @@ wxString wxFileName::GetLongPath() const { // We're using pathOut to collect the long-name path, // but using a temporary for appending the last path component which may be short-name - tmpPath = pathOut + m_dirs[i]; + tmpPath = pathOut + dirs[i]; if (tmpPath.Last() == wxT(':')) {