]> git.saurik.com Git - wxWidgets.git/commitdiff
Bug fix to Mkdirs and GetLongPath
authorJulian Smart <julian@anthemion.co.uk>
Mon, 26 Mar 2001 15:51:02 +0000 (15:51 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 26 Mar 2001 15:51:02 +0000 (15:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/filename.cpp

index 610a7c2993a5abd10055329c2ffb7e42a8f5d251..cf4867b024d762fdacb04dc5164aad0fa9f0c936 100644 (file)
@@ -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(':'))
             {