+ wxString myfullurl(myurl);
+
+#if wxUSE_URL
+ // consider url as absolute path first
+ wxURL current(wxURL::Unescape(myurl));
+ myfullurl = current.GetURL();
+
+ // if not absolute then ...
+ if( current.IsReference() )
+ {
+ wxString basepath = GetFS()->GetPath();
+ wxURI base(wxURL::Unescape(basepath));
+
+ // try to apply base path if valid ...
+ if( !base.IsReference() )
+ {
+ wxURI path(myfullurl);
+ path.Resolve( base );
+ myfullurl = path.BuildURI();
+ }
+ else
+ {
+ // ... or force such addition if not included already
+ if( !current.GetURL().Contains(basepath) )
+ {
+ basepath += myurl;
+ wxURL connected( wxURL::Unescape(basepath) );
+ myfullurl = connected.GetURL();
+ }
+ }
+ }
+#endif
+