X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/12d67f8ad049939cf90bbae7831597347c0bf787..a200c35efa060107d8243458fca160eb237b9c23:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 109cb88311..b9c16cd304 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -287,12 +287,16 @@ bool wxIsAbsolutePath (const wxString& filename) { #ifdef __WXMAC__ - if (filename != wxT("")) - { - if( filename.Find(':') != wxNOT_FOUND && filename[0] != ':' ) - return TRUE ; - } - return FALSE ; + if (filename != wxT("")) + { + // This seems wrong to me, but there is no fix. since + // "MacOS:MyText.txt" is absolute whereas "MyDir:MyText.txt" + // is not. Or maybe ":MyDir:MyText.txt" has to be used? RR. + + if (filename.Find(':') != wxNOT_FOUND && filename[0] != ':') + return TRUE ; + } + return FALSE ; #else if (filename != wxT("")) { @@ -1002,7 +1006,7 @@ wxConcatFiles (const wxString& file1, const wxString& file2, const wxString& fil bool wxCopyFile (const wxString& file1, const wxString& file2, bool overwrite) { -#if defined(__WIN32__) +#if defined(__WIN32__) && !defined(__WXMICROWIN__) // CopyFile() copies file attributes and modification time too, so use it // instead of our code if available // @@ -1129,7 +1133,7 @@ bool wxMkdir(const wxString& dir, int perm) // assume mkdir() has 2 args on non Windows-OS/2 platforms and on Windows too // for the GNU compiler -#if (!(defined(__WXMSW__) || defined(__WXPM__))) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__) +#if (!(defined(__WXMSW__) || defined(__WXPM__))) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__) || defined(__WXMICROWIN__) if ( mkdir(wxFNCONV(dirname), perm) != 0 ) #elif defined(__WXPM__) if (::DosCreateDir((PSZ)dirname, NULL) != 0) // enhance for EAB's?? @@ -1175,7 +1179,7 @@ bool wxPathExists(const wxChar *pszPathName) while ( wxEndsWithPathSeparator(strPath) ) { size_t len = strPath.length(); - if ( len == 1 || strPath[len - 1] == _T(':') ) + if ( len == 1 || (len == 3 && strPath[len - 2] == _T(':')) ) break; strPath.Truncate(len - 1); @@ -1197,7 +1201,7 @@ bool wxPathExists(const wxChar *pszPathName) // Get a temporary filename, opening and closing the file. wxChar *wxGetTempFileName(const wxString& prefix, wxChar *buf) { -#ifdef __WINDOWS__ +#if defined(__WINDOWS__) && !defined(__WXMICROWIN__) #ifndef __WIN32__ wxChar tmp[144]; @@ -1816,7 +1820,7 @@ bool wxSetWorkingDirectory(const wxString& d) // On non-Windows platform, probably just return the empty string. wxString wxGetOSDirectory() { -#ifdef __WINDOWS__ +#if defined(__WINDOWS__) && !defined(__WXMICROWIN__) wxChar buf[256]; GetWindowsDirectory(buf, 256); return wxString(buf);