]> git.saurik.com Git - wxWidgets.git/commitdiff
AddBook ignores wxMac paths (still won't work)
authorRobert Roebling <robert@roebling.de>
Sat, 14 Jul 2001 11:29:26 +0000 (11:29 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 14 Jul 2001 11:29:26 +0000 (11:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/helpdata.cpp

index 97dd46a709b255060392dada6236f9e4131ab806..7cf0465e1e6f067ecdea3ee1be4bf6af548dc5ea 100644 (file)
@@ -38,6 +38,7 @@
 #include "wx/log.h"
 #include "wx/html/htmlpars.h"
 #include "wx/html/htmldefs.h"
+#include "wx/filename.h"
 
 #include "wx/arrimpl.cpp"
 WX_DEFINE_OBJARRAY(wxHtmlBookRecArray)
@@ -567,8 +568,15 @@ bool wxHtmlHelpData::AddBook(const wxString& book)
                  index = wxEmptyString,
                  charset = wxEmptyString;
 
+#ifdef __WXMAC__
+        // wxIsAbsolutePath is broken
+        bookFull = wxGetCwd() + ":" + book;
+        wxFileName fn( bookFull );
+        bookFull = fn.GetFullPath( wxPATH_UNIX );
+#else
         if (wxIsAbsolutePath(book)) bookFull = book;
         else bookFull = wxGetCwd() + "/" + book;
+#endif
 
         fi = fsys.OpenFile(bookFull);
         if (fi == NULL)