From: Stefan Csomor Date: Thu, 23 Aug 2001 13:38:05 +0000 (+0000) Subject: added conversion to mac native filenames from local filesystem handler X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b838cfc9151aea38402ad2b1ba5d2f97cf94e973 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 --- diff --git a/samples/html/about/aboutmac6.mcp b/samples/html/about/aboutmac6.mcp new file mode 100644 index 0000000000..efe138bad1 Binary files /dev/null and b/samples/html/about/aboutmac6.mcp differ diff --git a/samples/html/test/makemac6.mcp b/samples/html/test/makemac6.mcp index af1d276877..2d3796845b 100644 Binary files a/samples/html/test/makemac6.mcp and b/samples/html/test/makemac6.mcp differ diff --git a/samples/html/virtual/virtualmac6.mcp b/samples/html/virtual/virtualmac6.mcp new file mode 100644 index 0000000000..5a03ad2a31 Binary files /dev/null and b/samples/html/virtual/virtualmac6.mcp differ diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index c06e2bebc2..d154b75f73 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -156,6 +156,12 @@ bool wxLocalFSHandler::CanOpen(const wxString& location) wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& 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)) return (wxFSFile*) NULL; @@ -170,6 +176,12 @@ wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& wxString wxLocalFSHandler::FindFirst(const wxString& spec, int flags) { 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); }