added conversion to mac native filenames from local filesystem handler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
BIN
samples/html/about/aboutmac6.mcp
Normal file
BIN
samples/html/about/aboutmac6.mcp
Normal file
Binary file not shown.
Binary file not shown.
BIN
samples/html/virtual/virtualmac6.mcp
Normal file
BIN
samples/html/virtual/virtualmac6.mcp
Normal file
Binary file not shown.
@@ -156,6 +156,12 @@ bool wxLocalFSHandler::CanOpen(const wxString& location)
|
|||||||
wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& location)
|
wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& location)
|
||||||
{
|
{
|
||||||
wxString right = GetRightLocation(location);
|
wxString right = GetRightLocation(location);
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
if ( right[0] != '.' && right[0] != '/' && right.Find( '/' ) != wxNOT_FOUND ) {
|
||||||
|
right = "./" + right ;
|
||||||
|
}
|
||||||
|
right = wxUnix2MacFilename( right ) ;
|
||||||
|
#endif
|
||||||
if (!wxFileExists(right))
|
if (!wxFileExists(right))
|
||||||
return (wxFSFile*) NULL;
|
return (wxFSFile*) NULL;
|
||||||
|
|
||||||
@@ -170,6 +176,12 @@ wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString&
|
|||||||
wxString wxLocalFSHandler::FindFirst(const wxString& spec, int flags)
|
wxString wxLocalFSHandler::FindFirst(const wxString& spec, int flags)
|
||||||
{
|
{
|
||||||
wxString right = GetRightLocation(spec);
|
wxString right = GetRightLocation(spec);
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
if ( right[0] != '.' && right[0] != '/' && right.Find( '/' ) != wxNOT_FOUND ) {
|
||||||
|
right = "./" + right ;
|
||||||
|
}
|
||||||
|
right = wxUnix2MacFilename( right ) ;
|
||||||
|
#endif
|
||||||
return wxFindFirstFile(right, flags);
|
return wxFindFirstFile(right, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user