int i;
char ft[] = "<!--#include virtual=";
- wxFileSystem *fs = new wxFileSystem;
- fs->ChangePathTo(DOC_ROOT, true);
int openedcount = 0;
// remove the #include tag
output.Remove(i, n+21+3);
- wxFSFile * file = fs->OpenFile(fname);
-
+ wxFSFile * file;
+ file = m_FS->OpenFile(fname);
+
if (!file) {
#ifdef CHECKED
wxMessageBox(wxString("wxHTML #include error: File not Found ") + fname + wxString("."),"Error",wxICON_ERROR);
delete file;
}
- delete fs;
return output;
}
value is the current directory. Directorys may be given as a relative path.
****************************************************************************/
void wxIncludePrep::ChangeDirectory(
- const wxString &dir)
+ wxFileSystem *fs)
{
-
- DOC_ROOT = dir;
+ m_FS = fs;
}