Fix for breakage with multiple books

This commit is contained in:
JulianSmart 2015-11-29 19:29:04 +00:00
parent ab95207c78
commit 78fe0ac3d8
3 changed files with 13 additions and 1 deletions

View File

@ -107,6 +107,7 @@ public:
void Resolve(const wxURI& base, int flags = wxURI_STRICT);
bool IsReference() const;
bool IsRelative() const;
protected:
void Clear();

View File

@ -313,6 +313,17 @@ bool wxURI::IsReference() const
return !HasScheme() || !HasServer();
}
// ---------------------------------------------------------------------------
// IsRelative
//
// FIXME: may need refinement
// ---------------------------------------------------------------------------
bool wxURI::IsRelative() const
{
return !HasScheme() && !HasServer();
}
// ---------------------------------------------------------------------------
// Parse
//

View File

@ -296,7 +296,7 @@ wxFSFile *wxHtmlWinParser::OpenURL(wxHtmlURLType type,
myfullurl = current.BuildURI();
// if not absolute then ...
if( current.IsReference() )
if( current.IsRelative() )
{
wxString basepath = GetFS()->GetPath();
wxURI base(basepath);