#include "wx/module.h"
#include "wx/filesys.h"
#include "wx/mimetype.h"
-
+#include "wx/filename.h"
wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& location)
{
+ // location has Unix path separators
wxString right = GetRightLocation(location);
- if (!wxFileExists(right))
+ wxFileName fn( right, wxPATH_UNIX );
+
+ if (!wxFileExists( fn.GetFullPath() ))
return (wxFSFile*) NULL;
-
- return new wxFSFile(new wxFileInputStream(right),
+
+ return new wxFSFile(new wxFileInputStream( fn.GetFullPath() ),
right,
GetMimeTypeFromExt(location),
GetAnchor(location),
- wxDateTime(wxFileModificationTime(right)));
+ wxDateTime(wxFileModificationTime( fn.GetFullPath() )));
}