X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0e6667e2699fccd04313780f6cf21dbff8a435a7..c47d0f2eb1fa40b287ad8bd16b593e3f6daa96e4:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 6e7c62ada3..33b30d5832 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -277,7 +277,7 @@ bool wxFileExists(const char *pszFileName) bool wxIsAbsolutePath (const wxString& filename) { - if (filename != "") + if (filename != _T("")) { if (filename[0] == _T('/') #ifdef __VMS__ @@ -514,6 +514,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name) /* prefix ~ */ if (nm[1] == SEP || nm[1] == 0) { /* ~/filename */ + // FIXME: wxGetUserHome could return temporary storage in Unicode mode if ((s = WXSTRINGCAST wxGetUserHome(_T(""))) != NULL) { if (*++nm) nm++; @@ -527,6 +528,7 @@ wxChar *wxExpandPath(wxChar *buf, const wxChar *name) was_sep = (*s == SEP); nnm = *s ? s + 1 : s; *s = 0; + // FIXME: wxGetUserHome could return temporary storage in Unicode mode if ((home = WXSTRINGCAST wxGetUserHome(wxString(nm + 1))) == NULL) { if (was_sep) /* replace only if it was there: */ *s = SEP; @@ -719,7 +721,7 @@ wxPathOnly (wxChar *path) // Return just the directory, or NULL if no directory wxString wxPathOnly (const wxString& path) { - if (path != "") + if (path != _T("")) { wxChar buf[_MAXPATHLEN]; @@ -992,7 +994,7 @@ bool wxMkdir(const wxString& dir, int perm) // assume mkdir() has 2 args on non Windows platforms and on Windows too // for the GNU compiler -#if !defined(__WXMSW__) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) +#if !defined(__WXMSW__) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__) if ( mkdir(wxFNCONV(dirname), perm) != 0 ) #else // MSW if ( mkdir(wxFNCONV(dirname)) != 0 ) @@ -1508,9 +1510,9 @@ wxString wxGetOSDirectory() #endif } -bool wxEndsWithPathSeparator(const char *pszFileName) +bool wxEndsWithPathSeparator(const wxChar *pszFileName) { - size_t len = Strlen(pszFileName); + size_t len = wxStrlen(pszFileName); if ( len == 0 ) return FALSE; else