]> git.saurik.com Git - wxWidgets.git/commitdiff
added conversion to mac native filenames from local filesystem handler
authorStefan Csomor <csomor@advancedconcepts.ch>
Thu, 23 Aug 2001 13:38:05 +0000 (13:38 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Thu, 23 Aug 2001 13:38:05 +0000 (13:38 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/html/about/aboutmac6.mcp [new file with mode: 0644]
samples/html/test/makemac6.mcp
samples/html/virtual/virtualmac6.mcp [new file with mode: 0644]
src/common/filesys.cpp

diff --git a/samples/html/about/aboutmac6.mcp b/samples/html/about/aboutmac6.mcp
new file mode 100644 (file)
index 0000000..efe138b
Binary files /dev/null and b/samples/html/about/aboutmac6.mcp differ
index af1d276877797fec3ac8cdefbb2f2643fcf1f1d7..2d3796845b0a0d3efd096d8ff2b382190ef67560 100644 (file)
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 (file)
index 0000000..5a03ad2
Binary files /dev/null and b/samples/html/virtual/virtualmac6.mcp differ
index c06e2bebc2e023a2c356ba5ef26d6abb10438451..d154b75f7334a2b9c37e95b150194398f052c8cd 100644 (file)
@@ -156,6 +156,12 @@ bool wxLocalFSHandler::CanOpen(const wxString& location)
 wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& location)
 {
     wxString right = GetRightLocation(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;
 
     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);
 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);
 }
 
     return wxFindFirstFile(right, flags);
 }