X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..1ed01484e7bcce3d1668b5b76c8bb1beb32e9559:/src/common/filefn.cpp diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 7cf2962bf7..9c79a5d13a 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1057,7 +1057,7 @@ wxRenameFile (const wxString& file1, const wxString& file2) bool wxRemoveFile(const wxString& file) { #if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__) - int flag = wxRemove(wxFNSTRINGCAST file.fn_str()); + int flag = wxRemove(file); #elif defined( __WXMAC__ ) int flag = unlink(wxUnix2MacFilename( file )); #else @@ -1176,9 +1176,15 @@ bool wxPathExists(const wxChar *pszPathName) #endif // __WINDOWS__ wxStructStat st; - +#ifndef __VISAGECPP__ return wxStat(wxFNSTRINGCAST strPath.fn_str(), &st) == 0 && ((st.st_mode & S_IFMT) == S_IFDIR); +#else + // S_IFMT not supported in VA compilers.. st_mode is a 2byte value only + return wxStat(wxFNSTRINGCAST strPath.fn_str(), &st) == 0 && + (st.st_mode == S_IFDIR); +#endif + } // Get a temporary filename, opening and closing the file.